All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org, Kees Cook <kees@kernel.org>
Subject: Re: [PATCH][next] net: inet_sock.h: Avoid thousands of -Wflex-array-member-not-at-end warnings
Date: Tue, 18 Nov 2025 12:27:17 -0800	[thread overview]
Message-ID: <20251118122717.16b723fd@kernel.org> (raw)
In-Reply-To: <bf9c2ceb-f80f-4fea-999d-4f46b2369721@embeddedor.com>

On Tue, 18 Nov 2025 13:36:41 +0900 Gustavo A. R. Silva wrote:
> Not sure what you mean by "nasty" and "no clear benefit", but here is an
> alternative. See it as RFC:

Meaning of the words per dictionary definition.

> https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?h=testing/wfamnae-next20251117&id=e0547082214e61b1db0f5068da0daa3d11f992a5
> 
> [PATCH RFC][next] ipv4/inet_sock.h: Avoid thousands of -Wflex-array-member-not-at-end warnings
> 
> Use DEFINE_RAW_FLEX() to avoid thousands of -Wflex-array-member-not-at-end
> warnings.
> 
> Remove fixed-size array char data[40]; from struct ip_options_data, so
> that flexible-array member struct ip_options_rcu::opt.__data[] ends last
> in this (and other) structure(s).
> 
> Compensate for this by using the DEFINE_RAW_FLEX() helper to declare each
> on-stack struct instance that contains struct ip_options_data as a member.

This is much better, thanks!

  reply	other threads:[~2025-11-18 20:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 11:43 [PATCH][next] net: inet_sock.h: Avoid thousands of -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2025-10-21 15:58 ` Simon Horman
2025-10-24  0:25 ` Jakub Kicinski
2025-10-24 11:24   ` Gustavo A. R. Silva
2025-10-24 23:23     ` Jakub Kicinski
2025-11-18  4:36       ` Gustavo A. R. Silva
2025-11-18 20:27         ` Jakub Kicinski [this message]
2025-11-19 22:40         ` Kees Cook

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=20251118122717.16b723fd@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=horms@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.