All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Eric Dumazet <edumazet@google.com>,
	Kees Cook <keescook@chromium.org>,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	<netdev@vger.kernel.org>, <linux-hardening@vger.kernel.org>,
	Simon Horman <horms@kernel.org>, "Jiri Pirko" <jiri@resnulli.us>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Coco Li <lixiaoyan@google.com>,
	Amritha Nambiar <amritha.nambiar@intel.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] netdev: Use flexible array for trailing private bytes
Date: Mon, 4 Mar 2024 07:24:49 -0800	[thread overview]
Message-ID: <20240304072449.0c10b397@kernel.org> (raw)
In-Reply-To: <ae6b1114-1c71-46f0-82e5-23b9f05df1bf@intel.com>

On Mon, 4 Mar 2024 15:32:51 +0100 Alexander Lobakin wrote:
> > 100% I should have linked to the thread that led to Kees's work.
> > Adding directly to net_device would be way better but there's
> > a handful of drivers which embed the struct.  
> 
> I think it's okay to embed a struct with flex array at the end as long
> as it's not used? Or the compiler will say that the flex array is not at
> the end of the structure?

Technically, yes. Practically it ties the lifetime of a refcounted
object to something semi-related with different lifetime rules :(

  reply	other threads:[~2024-03-04 15:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 21:30 [PATCH] netdev: Use flexible array for trailing private bytes Kees Cook
2024-02-29 22:15 ` Gustavo A. R. Silva
2024-03-01  6:59 ` Jakub Kicinski
2024-03-01  8:03   ` Eric Dumazet
2024-03-01 12:58     ` Alexander Lobakin
2024-03-01 13:25       ` Eric Dumazet
2024-03-01 14:30         ` Alexander Lobakin
2024-03-01 17:35           ` Jakub Kicinski
2024-03-04 14:32             ` Alexander Lobakin
2024-03-04 15:24               ` Jakub Kicinski [this message]
2024-03-01 11:41   ` Greg KH
2024-03-06 13:16   ` Breno Leitao
2024-03-06 15:06     ` Jakub Kicinski
2024-03-06 23:42       ` 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=20240304072449.0c10b397@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=amritha.nambiar@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixiaoyan@google.com \
    --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.