Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2224578rwr; Fri, 21 Apr 2023 06:13:40 -0700 (PDT) X-Google-Smtp-Source: AKy350ZW9pfAqTET83lN5roUjSkhKWATjqE4yppvvpBo80w6EmEhU0Pu4flNefauM0Eit81dPjaB X-Received: by 2002:a67:dc8c:0:b0:42c:599d:f96a with SMTP id g12-20020a67dc8c000000b0042c599df96amr2408999vsk.0.1682082820095; Fri, 21 Apr 2023 06:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682082820; cv=none; d=google.com; s=arc-20160816; b=qYKQvTIC0DqeIeMFMQK6jj7mi4ypd55ed3FtDPN5FC1FtixzGNGEGtpMCgnhvGbPbF nEIgcIcPmL2DkZBb4uW0+PnF2ViACdFIQRO1d3ZYxLBzqeHTKYjy5V35qQ2Ks0BGbmCy p5OUTF+wiOQm7Xcjm3CPeUA929wkpMP5IPx/Kb1kC3I74X577J91c27kxzCZTiUS891s 2xJf1drIb788AIbLCBCdC0ot4A8LSdlawy89wMRNZ+br/614QSYcZvLfP7dc1KkhWOe3 Z/y3ar9RoUV2f7O/yQoigVrK/mcIr86WX/MyZy7aHMd3rC/GWoUt/Cjnk/TA0GxBw/7q r2Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:organization:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=QiNZ4DbwfeRtR6XiuJp1Wqc0KMcg1d0rbJkt3W/VQOo=; b=ku+sDzYwD/w/OO1njU6kP7CbyNKOSnaE1Zv+1NeE5WUbxWNfelf8b0lnQclX7RL90t KveJiomtoQWaFZ/7KVq5V05bs0RYlnNJXZGIfuqXbwk6QKoO4xtSS2QEhBD6MpgMq1+t dnoQc25CVkd/TuxDOx9+dFFnBI5K7ErMLTJSTHdvXAD9FDHfbGe7RxCuSJtKhJmAAw7H V6cKCOscnt7SXGGen2YUS5wmYZwzV7oT0bS3pDZvh9C2G89DG/WDYzmldRuYWIxNMaJl 8MDIcE4YgK3Cm8yP/KCPNfxqjK2HdOWXTx6k7jsxJ13asgoFTmbHg5wocpYiwPN6kJnR fU/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@auristor.com header.s=MDaemon header.b=WY4Tkhmj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=auristor.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a67e305000000b00425e1dcd478si888093vsf.775.2023.04.21.06.13.21; Fri, 21 Apr 2023 06:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@auristor.com header.s=MDaemon header.b=WY4Tkhmj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=auristor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232426AbjDUNGo (ORCPT + 99 others); Fri, 21 Apr 2023 09:06:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231710AbjDUNGm (ORCPT ); Fri, 21 Apr 2023 09:06:42 -0400 X-Greylist: delayed 344 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Apr 2023 06:06:40 PDT Received: from sequoia-grove.ad.secure-endpoints.com (sequoia-grove.ad.secure-endpoints.com [IPv6:2001:470:1f07:f77:70f5:c082:a96a:5685]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AB0E527B for ; Fri, 21 Apr 2023 06:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/relaxed; d=auristor.com; s=MDaemon; r=y; t=1682082054; x=1682686854; i=jaltman@auristor.com; q=dns/txt; h=Message-ID:Date: MIME-Version:User-Agent:Subject:Content-Language:To:Cc: References:From:Organization:In-Reply-To:Content-Type; bh=QiNZ4D bwfeRtR6XiuJp1Wqc0KMcg1d0rbJkt3W/VQOo=; b=WY4TkhmjpYpVsrvQZRB43C grnCnnvb8mDwXXFaZ4KBLNuAQs1WO9n9TE15zu3prqGG07+6Js+Xhed0XXvsf+Be 13uptK/Gv5eSZOhNAyiY/hLOIRfFhb+I9U7Y00c83/Z8Po0GA8eeAUrBq8/HSvxb fXkGPVKUBQQyc/TdHJX/k= X-MDAV-Result: clean X-MDAV-Processed: sequoia-grove.ad.secure-endpoints.com, Fri, 21 Apr 2023 09:00:54 -0400 Received: from [IPV6:2603:7000:73c:9c99:b464:e099:19d:ace8] by auristor.com (IPv6:2001:470:1f07:f77:28d9:68fb:855d:c2a5) (MDaemon PRO v23.0.1) with ESMTPSA id md5001003405950.msg; Fri, 21 Apr 2023 09:00:54 -0400 X-Spam-Processed: sequoia-grove.ad.secure-endpoints.com, Fri, 21 Apr 2023 09:00:54 -0400 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 2603:7000:73c:9c99:b464:e099:19d:ace8 X-MDHelo: [IPV6:2603:7000:73c:9c99:b464:e099:19d:ace8] X-MDArrival-Date: Fri, 21 Apr 2023 09:00:54 -0400 X-MDOrigin-Country: US, NA X-Authenticated-Sender: jaltman@auristor.com X-Return-Path: prvs=1475361d20=jaltman@auristor.com X-Envelope-From: jaltman@auristor.com X-MDaemon-Deliver-To: linux-kernel@vger.kernel.org Message-ID: <5f69be9f-0008-0253-0fe2-e982fd718146@auristor.com> Date: Fri, 21 Apr 2023 09:00:48 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH][next] rxrpc: Replace fake flex-array with flexible-array member Content-Language: en-US To: "Gustavo A. R. Silva (gustavoars@kernel.org)" , David Howells , Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: From: Jeffrey E Altman Organization: AuriStor, Inc. In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms060708090701030008070901" X-MDCFSigsAdded: auristor.com X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a cryptographically signed message in MIME format. --------------ms060708090701030008070901 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/6/2023 3:57 PM, Gustavo A. R. Silva (gustavoars@kernel.org) wrote: > Zero-length arrays as fake flexible arrays are deprecated and we are > moving towards adopting C99 flexible-array members instead. > > Transform zero-length array into flexible-array member in struct > rxrpc_ackpacket. > > Address the following warnings found with GCC-13 and > -fstrict-flex-arrays=3 enabled: > net/rxrpc/call_event.c:149:38: warning: array subscript i is outside array bounds of ‘uint8_t[0]’ {aka ‘unsigned char[]’} [-Warray-bounds=] > > This helps with the ongoing efforts to tighten the FORTIFY_SOURCE > routines on memcpy() and help us make progress towards globally > enabling -fstrict-flex-arrays=3 [1]. > > Link: https://github.com/KSPP/linux/issues/21 > Link: https://github.com/KSPP/linux/issues/263 > Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] > Signed-off-by: Gustavo A. R. Silva > --- > net/rxrpc/protocol.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/rxrpc/protocol.h b/net/rxrpc/protocol.h > index 6760cb99c6d6..e8ee4af43ca8 100644 > --- a/net/rxrpc/protocol.h > +++ b/net/rxrpc/protocol.h > @@ -126,7 +126,7 @@ struct rxrpc_ackpacket { > uint8_t nAcks; /* number of ACKs */ > #define RXRPC_MAXACKS 255 > > - uint8_t acks[0]; /* list of ACK/NAKs */ > + uint8_t acks[]; /* list of ACK/NAKs */ > #define RXRPC_ACK_TYPE_NACK 0 > #define RXRPC_ACK_TYPE_ACK 1 > Reviewed-by: Jeffrey Altman --------------ms060708090701030008070901 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC DHEwggXSMIIEuqADAgECAhBAAYJpmi/rPn/F0fJyDlzMMA0GCSqGSIb3DQEBCwUAMDoxCzAJ BgNVBAYTAlVTMRIwEAYDVQQKEwlJZGVuVHJ1c3QxFzAVBgNVBAMTDlRydXN0SUQgQ0EgQTEz MB4XDTIyMDgwNDE2MDQ0OFoXDTI1MTAzMTE2MDM0OFowcDEvMC0GCgmSJomT8ixkAQETH0Ew MTQxMEQwMDAwMDE4MjY5OUEyRkQyMDAwMjMzQ0QxGTAXBgNVBAMTEEplZmZyZXkgRSBBbHRt YW4xFTATBgNVBAoTDEF1cmlTdG9yIEluYzELMAkGA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEB AQUAA4IBDwAwggEKAoIBAQCkC7PKBBZnQqDKPtZPMLAy77zo2DPvwtGnd1hNjPvbXrpGxUb3 xHZRtv179LHKAOcsY2jI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