From patchwork Thu Dec 5 18:34:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 180901 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2343342ile; Thu, 5 Dec 2019 10:34:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyI38+fGi51yURANX2fajMYlxWcz8ZeL/9h0owxpdZ/iV7NAgSF6MTCqndpdSNGE86skHJN X-Received: by 2002:aca:ac88:: with SMTP id v130mr8084005oie.123.1575570898510; Thu, 05 Dec 2019 10:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575570898; cv=none; d=google.com; s=arc-20160816; b=ykH7ds7BrF2v+YFDnifQJx9B7c5p4grjVtpwqq+7F4MzaKrOeWn7z10GAWdkYLtieM CnqMrgn3F4AmR//dJvydk6cT7MD065Mumq/0doiKo6rybZ3OIGE+7LiDmHzxHQd6qUOO ciQHjcgwshDyxDeDF4FWZVAjW7B0N7fGqhnsHpJgWeoMItgYV+sJ2f+5E9hbhAKCdBtE V48KiXWaW6+dtMw1sIOISSw4chHL3u0dM9rgXlYqiCQ0wpwcFneOhf1CQT5IdBlyftUH uxdMs1Q7ILNCniIyxzvTyoHO7W5HYIm1nxj9XnFAWicDxD0zkbMGEFef288U7BoavW+B 6a5w== 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=OimEbbcUDntF99YDSdiwfsMZcmm7NDLsiLTa/d5ROn5zPs6R9/M4FzettAHIosevQu CBBHsJ7Mu9PGMIpXvxK1wKqR/t9ZyrI7hkR1Zlsswea/bCKGqTBcnA7Sg01ExUoGIBvP eTBppuBYJVtNW9D9a3q+8P5BfVMpYgTk1G+ZFmuouctavuzfHKasRPLq5CNFmibuOH6h 7C31X3yoZhG7Y9oHJexJM1anOLnoGdHmYiPp1r8rrreBSg5fMjf7BwAP5FYrVIswyahX WLxRtXcJXlwtr5liW1jO6hmrcngaminX1uczv/FKymaZKkQm62IldU3nB4YlOLg434U0 kxPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=fH58Wzbt; dkim=pass header.i=@linaro.org header.s=google header.b=qq48xbjX; spf=pass (google.com: domain of libc-alpha-return-107756-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-107756-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 z18si5526654oti.306.2019.12.05.10.34.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Dec 2019 10:34:58 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-107756-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=fH58Wzbt; dkim=pass header.i=@linaro.org header.s=google header.b=qq48xbjX; spf=pass (google.com: domain of libc-alpha-return-107756-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-107756-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=W3LeGLst55VM7o9k9yeM9rZ+OWDQGtG A38Kvbu1J/+gddmMgSsIK3sGuNpzYWSrPHiyaGMY85a1lJP3s+eqZSiPxUO2ZD/Q zSCWVgr0K4LuH9lMEOgsWewXyIn2G49RjGVc4qdPh56l4U/HHfet63DFu/hyv7/O seoQDgaBX080= 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=fH58W zbtdk7OrH9VSQKfhq+wccasnO95MQWNdgJcyqoD5+9uhkJSLB/ZdmMUxhQUUCJAX tJ3nq7uRrCHOYqFUb6yo425Al2SIVLNdmTiljYaD3EsfUyNT5tQhpGdFerkrROHU LVyyF+TWzk843crlGn/V9PrZDbwipVZWX0p8OI= Received: (qmail 60474 invoked by alias); 5 Dec 2019 18:34:48 -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 60450 invoked by uid 89); 5 Dec 2019 18:34:48 -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=H*MI:sk:dff9adb, H*f:sk:dff9adb X-HELO: mail-ua1-f67.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=qq48xbjXvBAc0/iLiqVZxeVPPQtUdgI0rXz9E6z5MPoX/QxyDyikBRqqzBHuYRLiLO Ox9I7ZbZwim1qY01Vwt3WhWrUQcsQRLR85T4UtltN6vHymd34rPiVK0IfAgKsiiy/wtD FnOzMtaFvtfd8KqoaZ1KC8gFJMCTTAi3zRd/uEwbtPKYjrStK600YCkdNjENuw0r1fBv 6IUL0ZzeVRTqAEV7Yk2hP609nRoX88C0IJFfuoNTkCGkzo6SgBUSgDPxfRa5EZbTbgYb z4gD59lmwOoxFD/Plfji02wOMqVEp+1lWmBLCkczxyDPlNvJ1ofsChzf4n285phHf8QP tbwg== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2 2/3] linux: Remove SIGCANCEL/SIGSETXID handling on sigprocmask Date: Thu, 5 Dec 2019 15:34:36 -0300 Message-Id: <20191205183437.22696-2-adhemerval.zanella@linaro.org> In-Reply-To: <20191205183437.22696-1-adhemerval.zanella@linaro.org> References: <20191205183437.22696-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)