From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 57DE0386F425 for ; Tue, 21 Apr 2020 14:07:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 57DE0386F425 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jQtYQ-0007MU-SG; Tue, 21 Apr 2020 14:07:14 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jQtYQ-0004P6-Pl; Tue, 21 Apr 2020 16:07:14 +0200 From: Florian Weimer To: Adhemerval Zanella Cc: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH 4/4] signal: Only handle on NSIG signals on signal functions (BZ #25657) References: <20200313194827.4467-1-adhemerval.zanella@linaro.org> <20200313194827.4467-4-adhemerval.zanella@linaro.org> <87wo69q9tg.fsf@mid.deneb.enyo.de> <7daba627-610d-fc70-9227-ed5728869f9f@linaro.org> <87sggxq8uq.fsf@mid.deneb.enyo.de> <6a7af7ed-9a93-c8a6-7e7b-a9f3025f290b@linaro.org> <87k129q7aq.fsf@mid.deneb.enyo.de> <94cfdaa9-583e-dc6b-89dd-436051a0d2bb@linaro.org> Date: Tue, 21 Apr 2020 16:07:14 +0200 In-Reply-To: <94cfdaa9-583e-dc6b-89dd-436051a0d2bb@linaro.org> (Adhemerval Zanella's message of "Tue, 21 Apr 2020 11:02:57 -0300") Message-ID: <87ftcxq6el.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 14:07:20 -0000 * Adhemerval Zanella: > On 21/04/2020 10:47, Florian Weimer wrote: >> * Adhemerval Zanella: >> >>> On 21/04/2020 10:14, Florian Weimer wrote: >>> Only handle __NSIG_WORDS on linux sigsetopts.h instead of _SIGSET_NWORDS >>> when manipulating sigset_t masks. >> >> Hmm. __NSIG_WORDS is defined like this: >> >>> +# define __NSIG_WORDS (_NSIG / (8 * sizeof (unsigned long int ))) >> >> This gives us two words for _NSIG == 65. Is this correct? > > Two words (32-bits) for all 64-bit architectures, sizeof (unsigned long int) is 8 on 64-bit. 65 / (8 * 8) is 1. I assume that for _NSIG == 65, the signal numbers from 0 to 64 are all valid and can be manipulated using sigaddset etc. This suggests to me that we need three 32-bit longs and two 64-bit longs. Sorry, maybe I'm confused, I'm not feeling too well this week.