From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Florian Westphal <fw@strlen.de>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Phil Sutter <phil@nwl.cc>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Kees Cook <kees@kernel.org>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2][next] netfilter: x_tables: Avoid a couple -Wflex-array-member-not-at-end warnings
Date: Thu, 9 Apr 2026 16:23:59 -0600 [thread overview]
Message-ID: <3d07eb02-1a18-4de1-9683-5c05b80600e2@embeddedor.com> (raw)
In-Reply-To: <adglrthId0L5__9w@strlen.de>
On 4/9/26 16:18, Florian Westphal wrote:
> Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:
>> diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
>> index b39017c80548..9dd5957d9ed4 100644
>> --- a/net/netfilter/x_tables.c
>> +++ b/net/netfilter/x_tables.c
>> @@ -819,13 +819,15 @@ EXPORT_SYMBOL_GPL(xt_compat_match_to_user);
>>
>> /* non-compat version may have padding after verdict */
>> struct compat_xt_standard_target {
>> - struct compat_xt_entry_target t;
>> - compat_uint_t verdict;
>> + TRAILING_OVERLAP(struct compat_xt_entry_target, t, data,
>> + compat_uint_t verdict;
>> + );
>> };
>>
>> struct compat_xt_error_target {
>> - struct compat_xt_entry_target t;
>> - char errorname[XT_FUNCTION_MAXNAMELEN];
>> + TRAILING_OVERLAP(struct compat_xt_entry_target, t, data,
>> + char errorname[XT_FUNCTION_MAXNAMELEN];
>> + );
>> };
>>
>> You tell me what you prefer.
>
> I have no strong opinion. This compat code is needed to run 32bit
> iptables binaries on a 64 bit host, not many users these days I think.
> I still hope we can remove this eventually.
>
> But as the above diff is smaller I would prefer it.
Okay; I'll submit this as v3 then.
Thanks for the feedback,
-Gustavo
prev parent reply other threads:[~2026-04-09 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 20:28 [PATCH v2][next] netfilter: x_tables: Avoid a couple -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2026-04-09 22:09 ` Gustavo A. R. Silva
2026-04-09 22:18 ` Florian Westphal
2026-04-09 22:23 ` Gustavo A. R. Silva [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d07eb02-1a18-4de1-9683-5c05b80600e2@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=gustavoars@kernel.org \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox