[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 17/23] linux-user/ppc: Implement setup_sigtramp
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 17/23] linux-user/ppc: Implement setup_sigtramp |
Date: |
Tue, 29 Jun 2021 15:52:58 +0100 |
On Fri, 18 Jun 2021 at 20:47, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Create and record the two signal trampolines.
>
> Cc: qemu-ppc@nongnu.org
> Signed-off-by: Richard Henderson <richard.henderson@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.maydell@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
- Re: [PATCH v2 07/23] linux-user/cris: Implement setup_sigtramp, (continued)
[PATCH v2 12/23] linux-user/microblaze: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 16/23] linux-user/openrisc: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 20/23] linux-user/sh4: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 14/23] linux-user/mips: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 11/23] linux-user/m68k: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 10/23] linux-user/i386: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 17/23] linux-user/ppc: Implement setup_sigtramp, Richard Henderson, 2021/06/18
- Re: [PATCH v2 17/23] linux-user/ppc: Implement setup_sigtramp,
Peter Maydell <=
[PATCH v2 21/23] linux-user/sparc: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 23/23] linux-user: Remove default for TARGET_ARCH_HAS_SIGTRAMP_PAGE, Richard Henderson, 2021/06/18
[PATCH v2 19/23] linux-user/s390x: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 15/23] linux-user/nios2: Document non-use of setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 22/23] linux-user/xtensa: Implement setup_sigtramp, Richard Henderson, 2021/06/18
[PATCH v2 18/23] linux-user/riscv: Implement setup_sigtramp, Richard Henderson, 2021/06/18