Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5482140rwb; Wed, 9 Aug 2023 05:05:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8lCekhUIG/DMYSB9KMwnqrIyPpIdESzQEH5IdjiqIdbymnJR96FPi5EgL8Y/YCrId/ss4 X-Received: by 2002:a05:6a00:3a05:b0:687:472f:5150 with SMTP id fj5-20020a056a003a0500b00687472f5150mr1974435pfb.8.1691582715438; Wed, 09 Aug 2023 05:05:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691582715; cv=none; d=google.com; s=arc-20160816; b=BGAdu+bOMrfDZF7DYQTvQe/QelmSrSbnOv3ihAzfy/+yRDMzmJ469NcMxoYEQsOb8N 7ZA1eCvNgus9icMCijaoB+QbOoNMSxM2NLSKwEPKIm5lZy+Tsqo6PH7IL+p6iDxDQTBo ZmSpkezTmAk8MEb7SDjjA+IRTmTyFaz7Fqwu19Qj9TeTlMpM7AWeqoiUXXNh4kxbqzn4 rXlnYauA2bsXSMtyUJCrMYLVK5YBLT7p1A9faTftWlM8wMCUR1iGnhjX9kYa71jf1tSJ L3mOFPVqVGHODVnrZnrVvKtTzpaobJn07ITj1luXKMVGeCK+u5jNEUEokxlhWh3pb7Eo Kn8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=cAOpgQRi4QNWhzjoVQB48WDfR6U7kccdll0U98LmQw0=; fh=DYaKZ/mrwNlpigo7L61ADp2LINS6O2UktVFbDwjAVlI=; b=Ies/aGGEYGanzGIEMOF0Usd/JN6jv4bufN6/X4A9kR0Rh+2tareCvDNv9uzMZPat7n QfAutPn84Ioi9rxJJ2pGi1yOyrYMhdsK8EjtSNQN/xKSlQfpOjbXhKkOUgDbG+0qrXjN 8S02C5czB5kh4N5SQwooDhLB7jxXc/zUnVA7HanYHE1gb96Nm6l4ePPWFnPPboeR2aPZ K5lpeO/lsJo64sAP34ZvHhSB4c9/v8w3E0hN7ViPvv+eKuuj2BWCNYeKOl99fgdyyWPI 9oMQxhMFj8fQ/t0nPhrGV+KOOIv8mD0r7f3nPnDgiSacwhLY+iG8/viYLyVq381t10d2 KQcQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020aa78887000000b0068717b693e5si9359608pfe.135.2023.08.09.05.05.01; Wed, 09 Aug 2023 05:05:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233001AbjHILD5 (ORCPT + 99 others); Wed, 9 Aug 2023 07:03:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232989AbjHILDz (ORCPT ); Wed, 9 Aug 2023 07:03:55 -0400 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> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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