All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [PATCH v2 7/7] linux-user/nios2: Use set_sigmask in do_rt_sigreturn
Date: Mon, 20 Dec 2021 18:50:12 -0800	[thread overview]
Message-ID: <20211221025012.1057923-8-richard.henderson@linaro.org> (raw)
In-Reply-To: <20211221025012.1057923-1-richard.henderson@linaro.org>

Using do_sigprocmask directly was incorrect, as it will
leave the signal blocked by the outer layers of linux-user.

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/nios2/signal.c | 2 +-
 linux-user/signal.c       | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c
index 80e3d42fc9..517cd39270 100644
--- a/linux-user/nios2/signal.c
+++ b/linux-user/nios2/signal.c
@@ -205,7 +205,7 @@ long do_rt_sigreturn(CPUNios2State *env)
     }
 
     target_to_host_sigset(&set, &frame->uc.tuc_sigmask);
-    do_sigprocmask(SIG_SETMASK, &set, NULL);
+    set_sigmask(&set);
 
     if (rt_restore_ucontext(env, &frame->uc, &rval)) {
         goto badframe;
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 6d5e5b698c..8cb33a351c 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -258,7 +258,6 @@ int do_sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
     return 0;
 }
 
-#if !defined(TARGET_NIOS2)
 /* Just set the guest's signal mask to the specified value; the
  * caller is assumed to have called block_signals() already.
  */
@@ -268,7 +267,6 @@ void set_sigmask(const sigset_t *set)
 
     ts->signal_mask = *set;
 }
-#endif
 
 /* sigaltstack management */
 
-- 
2.25.1



  parent reply	other threads:[~2021-12-21  2:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21  2:50 [PATCH v2 0/7] linux-user: nios2 fixes Richard Henderson
2021-12-21  2:50 ` [PATCH v2 1/7] linux-user/nios2: Properly emulate EXCP_TRAP Richard Henderson
2021-12-22 18:52   ` Laurent Vivier
2022-01-05 10:23   ` Laurent Vivier
2021-12-21  2:50 ` [PATCH v2 2/7] linux-user/nios2: Fixes for signal frame setup Richard Henderson
2022-01-05 10:23   ` Laurent Vivier
2021-12-21  2:50 ` [PATCH v2 3/7] linux-user/elfload: Rename ARM_COMMPAGE to HI_COMMPAGE Richard Henderson
2022-01-05 10:24   ` Laurent Vivier
2021-12-21  2:50 ` [PATCH v2 4/7] linux-user/nios2: Map a real kuser page Richard Henderson
2021-12-22 20:18   ` Laurent Vivier
2022-01-05 10:24   ` Laurent Vivier
2021-12-21  2:50 ` [PATCH v2 5/7] linux-user/nios2: Fix EA vs PC confusion Richard Henderson
2021-12-22 20:20   ` Laurent Vivier
2022-01-05 10:24   ` Laurent Vivier
2021-12-21  2:50 ` [PATCH v2 6/7] linux-user/nios2: Fix sigmask in setup_rt_frame Richard Henderson
2022-01-05 10:24   ` Laurent Vivier
2021-12-21  2:50 ` Richard Henderson [this message]
2022-01-05 10:24   ` [PATCH v2 7/7] linux-user/nios2: Use set_sigmask in do_rt_sigreturn Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211221025012.1057923-8-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.