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 2B5193851C28 for ; Sun, 3 May 2020 20:23:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2B5193851C28 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 1jVL8i-0003vo-Ag; Sun, 03 May 2020 20:23:04 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jVL8i-0000jR-6w; Sun, 03 May 2020 22:23:04 +0200 From: Florian Weimer To: DJ Delorie Cc: libc-alpha@sourceware.org, amonakov@ispras.ru, schwab@linux-m68k.org Subject: Re: [patch] Use unsigned constants for ICMP6 filters [BZ #22489] References: Date: Sun, 03 May 2020 22:23:04 +0200 In-Reply-To: (DJ Delorie's message of "Thu, 30 Apr 2020 16:47:50 -0400") Message-ID: <87r1w0ix93.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-9.7 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: Sun, 03 May 2020 20:23:08 -0000 * DJ Delorie: > The core problem here is that the filter array is unsigned but the > computed constants are signed. This both causes a signededness > conversion at the &= step and may cause undefined behavior if the MSB > is being modified. This patch uses unsigned constants to avoid both > cases. - DJ I'd say that the filter array *elements* are unsigned, but I don't feel strongly about that.