From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1829174CA for ; Wed, 9 Aug 2023 11:03:55 +0000 (UTC) Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDEF410F3; Wed, 9 Aug 2023 04:03:54 -0700 (PDT) Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.94.2) (envelope-from ) id 1qTgya-0001jV-So; Wed, 09 Aug 2023 13:03:41 +0200 Date: Wed, 9 Aug 2023 13:03:40 +0200 From: Phil Sutter To: "GONG, Ruiqi" Cc: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , Kees Cook , "Gustavo A . R . Silva" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Wang Weiyang , Xiu Jianfeng , gongruiqi1@huawei.com Subject: Re: [PATCH] netfilter: ebtables: replace zero-length array members Message-ID: Mail-Followup-To: Phil Sutter , "GONG, Ruiqi" , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , Kees Cook , "Gustavo A . R . Silva" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Wang Weiyang , Xiu Jianfeng , gongruiqi1@huawei.com References: <20230809075136.1323302-1-gongruiqi@huaweicloud.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230809075136.1323302-1-gongruiqi@huaweicloud.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Wed, Aug 09, 2023 at 03:51:36PM +0800, GONG, Ruiqi wrote: > From: "GONG, Ruiqi" > > As suggested by Kees[1], replace the old-style 0-element array members > of multiple structs in ebtables.h with modern C99 flexible array. > > [1]: https://lore.kernel.org/all/5E8E0F9C-EE3F-4B0D-B827-DC47397E2A4A@kernel.org/ > > Link: https://github.com/KSPP/linux/issues/21 > Signed-off-by: GONG, Ruiqi I tried this once[1], but it was rejected pointing at a revert[2]. It seems gcc was improved since then: The warning is gone and I don't find -Wno-stringop-overflow flag in iptables sources. Cheers, Phil [1] https://lore.kernel.org/all/20200719100220.4666-1-phil@nwl.cc/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1e6e9d0f4859ec698d55381ea26f4136eff3afe1