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: 181147 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp6241875ile; Tue, 10 Dec 2019 10:33:07 -0800 (PST) X-Google-Smtp-Source: APXvYqy7PuAD2N19IsFY9UVrQUrrn28mdor43snpQnWG5zWefQUWdDyXqeyPYdm6HaIMkFoF2lWK X-Received: by 2002:aca:180a:: with SMTP id h10mr190261oih.99.1576002787508; Tue, 10 Dec 2019 10:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576002787; cv=none; d=google.com; s=arc-20160816; b=ElQc8pCdvqdvl9XLXSEwlK2B0GR9XPB7l/YAz1ErGpp8GTNXbOM2F64AZW+tCXht8B RRJUQzDha603mb8ie5tZERAOiumqlY6tLZcZk3luB+Tb9fA0JhadSFscgF/L5PoG9vwz tYwYwjlTvMPiES6QomfH+238Ko/nEt7TS0mPmO9KQhP3Fszy84QFIyo3dTcb3g5eyk4R 34FOyNLgcwpyFIkp/U5gLA2AWObdnKnUtEiBsJPMrQfg4aNWDqkdcIhaKyX2/gly+FBW zwX6plCpTDiVQbqRxMKizbrJxvUaogviGfnElh7clzNNYBxWQagEgGzqsrD4Xpr99O2p eDgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=Y4b4cd51VUxLBRlxTfEpD8Zg7+nIrQih252Za/Tdm78=; b=tPtJ7nXISPwft52o6UzZ2qokYPC8uoHMbwCbXTeppJOBOnS9nMCqDhiidg+0xvZlmH 94AXE2ZyEXriiU4pcHYRjSdM7eT0xcIf05UiCbHEsKy9ymwrjVd2JhP2ncZgBlH2Rnx3 gwKOf/5dKdXIfWPppJZyanYPkivLqiO0lJ5IbHv2wHNAr3UJDBZ64ov/LEoJKr+Mhn7q mOULlq9veET4hU0hBVELeymH82r0P8BEPBGMbE4fArPRu+iMyLLeCEyT4MYhCTXzoJgF 5DA3sIt4sLVhwEu96Nwb054UE9v7JHNfFtJ7O+PqDSEkUtyVqsYonGlbOcdIQ8ByiDqW HYrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=itCtDq0K; dkim=pass header.i=@linaro.org header.s=google header.b=qaU9nD5I; spf=pass (google.com: domain of libc-alpha-return-107898-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-107898-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a9si2434064oib.59.2019.12.10.10.33.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2019 10:33:07 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-107898-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=itCtDq0K; dkim=pass header.i=@linaro.org header.s=google header.b=qaU9nD5I; spf=pass (google.com: domain of libc-alpha-return-107898-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-107898-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=JNCLQPamOSjRHJQz0wj36QgetCnDl0/ Y/xmh33RWVCHk2f63DB+/YIhCuYL8XfI+FyKc7jILX2GeHqlim7EFAwDK+pp7sx+ m/aUCybjws8m9cJxj3UUOL9QSaDBdu24sgaSo1Tcb4vWCf7GFfXDCii9brj1h86K rxW8AYcs3F3A= 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=itCtD q0KfxStWscGNqwfpFG6Hx0uE91Rb2skQem2F2227ntUGYupxyf0oUvBOxPCnbzB2 Ov1EKdYuVgTxe4iNccw9nXSBVuw2c0CD6aUQsE6V3+3RlxWfacCc2JrMmJw8AUKt czZQPDiUEyRsVJInAjUTffIUVrTkie6+6K9+j0= 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== Return-Path: 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(-) -- 2.17.1 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)