From patchwork Tue Dec 10 18:32:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1207202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107898-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="abgs2DRI"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="qaU9nD5I"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47XTFr0zKyz9sPJ for ; Wed, 11 Dec 2019 05:33:03 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=XNt7VldrBJTZCzY55muDeeqvW0Zhj0I JBApHWKaWbyxZ6a1GmFv+18Wmc9bNseyZgtIbkoIgq6iAg+ro2ReV0mW7jxiT+08 fdEPKQGg+W5gLriCd9blt+1mbKw10yBh0dE048MFMKeqMfBWwhtq76k0U2hfMuBr T7OPizmZ+SNg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=EkcvdyCkGY4Jn+7/X4wtjWzBjvU=; b=abgs2 DRIeqsIwvp9fyelxS7meBBAAEI5BqBv6XG3KhJNOxm6dim52OO6wi+PwN10GYv2c HKdyR5LLNLbM0lbZ3GtLsIXOXygMoQh9R0JxwJpEcLK5zdEQCikvLC+5ktchnHt5 rxIWomdzj1uUqccTCB0mKM0IzhKz7bP1isYreE= Received: (qmail 39646 invoked by alias); 10 Dec 2019 18:32:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 39594 invoked by uid 89); 10 Dec 2019 18:32:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1489, HX-Google-Smtp-Source:APXvYqwH X-HELO: mail-vs1-f68.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=Y4b4cd51VUxLBRlxTfEpD8Zg7+nIrQih252Za/Tdm78=; b=qaU9nD5Iw+SIEM5Eb2B3RGc7IKhvuF1Ghdyyp2yyqeixNIVg0DfG7FDYnWXcovy2jV PBAFESm2NS09hT4g/Cxsg+Pvh4w37xrdDO5YgDA87pu47SsBWmsy2qpAWV95y8Iav4o7 r/E9mjgZh9KpQP8JD2BzT91Gd/sHKyGjqwJars2wL6XCyNe2/XyEAlYHZ0GiN7B9tzx2 tnxWkck4xmOzsAgpuzj9qjI8XPqBtIuNBLNFb+VnVxcirRDH35nzKNYtzQcIWcAZm3Bn hTNJMIUM7TbWljYiYdECjkGEmcdCpE+SWkU+vOud992kFyAT7FT0eKYbL7UdrmonSJC/ 6nLw== From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2 5/7] linux: Remove SIGCANCEL/SIGSETXID handling on sigprocmask Date: Tue, 10 Dec 2019 15:32:19 -0300 Message-Id: <20191210183221.26912-5-adhemerval.zanella@linaro.org> In-Reply-To: <20191210183221.26912-1-adhemerval.zanella@linaro.org> References: <20191210183221.26912-1-adhemerval.zanella@linaro.org> The sigfillset already does it, and this is the canonical way to operate on sigset_t. The only way to actually broke this assumption is if caller initialize sigset with memset or something similar, i.e, bypassing glibc (and again this is not a valid construction). Checked on x86_64-linux-gnu. --- sysdeps/unix/sysv/linux/sigprocmask.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c index 73b0d0c19a..c6961a8ac4 100644 --- a/sysdeps/unix/sysv/linux/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/sigprocmask.c @@ -16,26 +16,12 @@ . */ #include -#include /* SIGCANCEL, SIGSETXID */ +#include /* Get and/or change the set of blocked signals. */ int __sigprocmask (int how, const sigset_t *set, sigset_t *oset) { - sigset_t local_newmask; - - /* The only thing we have to make sure here is that SIGCANCEL and - SIGSETXID are not blocked. */ - if (set != NULL - && __glibc_unlikely (__sigismember (set, SIGCANCEL) - || __glibc_unlikely (__sigismember (set, SIGSETXID)))) - { - local_newmask = *set; - __sigdelset (&local_newmask, SIGCANCEL); - __sigdelset (&local_newmask, SIGSETXID); - set = &local_newmask; - } - return INLINE_SYSCALL_CALL (rt_sigprocmask, how, set, oset, _NSIG / 8); } libc_hidden_def (__sigprocmask)