diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2024-10-17 14:54:43 +0200 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-10-22 13:45:03 -0700 |
commit | 8704132805cf7a3259d1c5a073b3c2b92afa2616 (patch) | |
tree | 343a1425088a1e2bb6e67c0a78bc13551588fcd9 /linux-user | |
parent | bbd5630a75e70a0f1bcf04de74c94aa94a145628 (diff) |
linux-user/ppc: Fix sigmask endianness issue in sigreturn
do_setcontext() copies the target sigmask without endianness handling
and then uses target_to_host_sigset_internal(), which expects a
byte-swapped one. Use target_to_host_sigset() instead.
Fixes: bcd4933a23f1 ("linux-user: ppc signal handling")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241017125811.447961-2-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/ppc/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index a1d8c0bccc..24e5a02a78 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -628,7 +628,7 @@ static int do_setcontext(struct target_ucontext *ucp, CPUPPCState *env, int sig) if (!lock_user_struct(VERIFY_READ, mcp, mcp_addr, 1)) return 1; - target_to_host_sigset_internal(&blocked, &set); + target_to_host_sigset(&blocked, &set); set_sigmask(&blocked); restore_user_regs(env, mcp, sig); |