linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: signal32: Drop pointless call to sigdelsetmask()
@ 2021-08-25  9:39 Will Deacon
  2021-08-26 11:07 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Will Deacon @ 2021-08-25  9:39 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-kernel, Will Deacon, Catalin Marinas, Al Viro

Commit 77097ae503b1 ("most of set_current_blocked() callers want
SIGKILL/SIGSTOP removed from set") extended set_current_blocked() to
remove SIGKILL and SIGSTOP from the new signal set and updated all
callers accordingly.

Unfortunately, this collided with the merge of the arm64 architecture,
which duly removes these signals when restoring the compat sigframe, as
this was what was previously done by arch/arm/.

Remove the redundant call to sigdelsetmask() from
compat_restore_sigframe().

Cc: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Will Deacon <will@kernel.org>
---
 arch/arm64/kernel/signal32.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index 2f507f565c48..4850333669fb 100644
--- a/arch/arm64/kernel/signal32.c
+++ b/arch/arm64/kernel/signal32.c
@@ -46,8 +46,6 @@ struct compat_aux_sigframe {
 	unsigned long			end_magic;
 } __attribute__((__aligned__(8)));
 
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
 static inline int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set)
 {
 	compat_sigset_t	cset;
@@ -190,10 +188,8 @@ static int compat_restore_sigframe(struct pt_regs *regs,
 	unsigned long psr;
 
 	err = get_sigset_t(&set, &sf->uc.uc_sigmask);
-	if (err == 0) {
-		sigdelsetmask(&set, ~_BLOCKABLE);
+	if (err == 0)
 		set_current_blocked(&set);
-	}
 
 	__get_user_error(regs->regs[0], &sf->uc.uc_mcontext.arm_r0, err);
 	__get_user_error(regs->regs[1], &sf->uc.uc_mcontext.arm_r1, err);
-- 
2.33.0.rc2.250.ged5fa647cd-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: signal32: Drop pointless call to sigdelsetmask()
  2021-08-25  9:39 [PATCH] arm64: signal32: Drop pointless call to sigdelsetmask() Will Deacon
@ 2021-08-26 11:07 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2021-08-26 11:07 UTC (permalink / raw)
  To: linux-arm-kernel, Will Deacon; +Cc: linux-kernel, Al Viro

On Wed, 25 Aug 2021 10:39:11 +0100, Will Deacon wrote:
> Commit 77097ae503b1 ("most of set_current_blocked() callers want
> SIGKILL/SIGSTOP removed from set") extended set_current_blocked() to
> remove SIGKILL and SIGSTOP from the new signal set and updated all
> callers accordingly.
> 
> Unfortunately, this collided with the merge of the arm64 architecture,
> which duly removes these signals when restoring the compat sigframe, as
> this was what was previously done by arch/arm/.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: signal32: Drop pointless call to sigdelsetmask()
      https://git.kernel.org/arm64/c/24de5838db70

-- 
Catalin


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-26 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  9:39 [PATCH] arm64: signal32: Drop pointless call to sigdelsetmask() Will Deacon
2021-08-26 11:07 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).