From patchwork Wed Aug 25 09:39:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 12456891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A404FC4338F for ; Wed, 25 Aug 2021 09:40:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 758B96054E for ; Wed, 25 Aug 2021 09:40:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 758B96054E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rN7r1Gos16Q5GeQnmVCr8I/nmpdE4JAHOTtcL7RvEmk=; b=LmJY6tXZ5cbuG8 fBC4sHmSFE0PgmeD9Hil7OyVbcSL3EySnAj2oIQ3Exf1b9tLzSMAwhJdeiJhlAhzyQONtmSYEqFyY kOdjIi4MvGD+eTXJPsWMDcgFyzbGYWMGhKNxiDoF/anf3bEbO19ARTp8o/GRq/+Tv4HxKV6nZTJQy dgtySfymSM5VTEWBeWnQ3R9R7jvepQ9wFARJZXtdekwhXgUAPXycIIVByaHUDBFW/2e0guRLj+1BC P/dpO+4r79C3P/Zj2Iqe4HyRQ1wat0p0jdgeq+R7r4jec4LsyAiVzET62rcxaJ61acJJGYfyn2Ii+ fM3Tbnb6kVgDK72aRHTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIpNf-006B4s-Hq; Wed, 25 Aug 2021 09:39:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIpNT-006Axo-4q for linux-arm-kernel@lists.infradead.org; Wed, 25 Aug 2021 09:39:28 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id B24C3610CE; Wed, 25 Aug 2021 09:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629884362; bh=m04P8lfsKUBV3SPkcLaBDDyhcaMgaHK2RT+ylPPu9eg=; h=From:To:Cc:Subject:Date:From; b=QSrZrUTxiMCQEPeQs1qXBOHAAPJsXEiC/Ht3OF3rnYgcPdowM8T8/ic0LerRGoC9+ MzJlqgTdLMqXb+6e/e5fGDifPUWwoOYNmAUeYSdn3NOIDTvz35CX4QgxKjn8QuB4z3 TRGVBr4nOxlS4woAlZyJvuor/SVBFSEuuxQG2nHG5aaQrWFvbKK4Kkvs8uqcDhsYM9 pdSPF/tbcgKu5COTQ/DqoYJlk98xvKa1W1fiMcHJRdydnaNtzzG+/gmCVPnDfNVK7T UwJr/E2KE8nzDndeMNqEOfy9TG6A/M+qubojzIs5zc+mq9rl+kZYt5Va5+6E9ZRn7E PAha+ctjcCPSw== From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Will Deacon , Catalin Marinas , Al Viro Subject: [PATCH] arm64: signal32: Drop pointless call to sigdelsetmask() Date: Wed, 25 Aug 2021 10:39:11 +0100 Message-Id: <20210825093911.24493-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210825_023923_260075_8832EBD4 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reported-by: Al Viro Signed-off-by: Will Deacon --- 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);