On Fri, 18 Jun 2021 at 20:47, Richard Henderson <richard.hender...@linaro.org> wrote: > > Create and record the two signal trampolines. > > Cc: qemu-...@nongnu.org > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > linux-user/ppc/target_signal.h | 2 ++ > linux-user/ppc/signal.c | 34 ++++++++++++++++++---------------- > 2 files changed, 20 insertions(+), 16 deletions(-)
Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> encode_trampoline() returns doing nothing if its first argument is zero. It's not clear to me why it does that (it seems to have been that way since the ppc signal handling code was added in 2009 in commit bcd4933a23f1db). Is this because in some configurations there is no NR_sigreturn syscall, only NR_rt_sigreturn (or vice-versa)? If so, it would be better to handle that by not setting up the default_sigreturn pointer, and assert()ing that it's not NULL if we ever try to use it. (I would vaguely have expected that to result in NR_rt_whatever not being defined, rather than it being defined to 0, though.) If there is no way that the first argument to encode_trampoline() can ever be non-zero, we should delete the unnecessary if(). thanks -- PMM