[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeBiZ_aulsAqP83c@smile.fi.intel.com>
Date: Thu, 29 Feb 2024 12:54:31 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Kees Cook <keescook@...omium.org>
Cc: Jakub Kicinski <kuba@...nel.org>, Vinod Koul <vkoul@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Mark Brown <broonie@...nel.org>,
linux-arm-kernel@...ts.infradead.org, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
linux-spi@...r.kernel.org, netdev@...r.kernel.org,
linux-hardening@...r.kernel.org,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>
Subject: Re: [PATCH v4 7/8] net-device: Use new helpers from overflow.h in
netdevice APIs
On Wed, Feb 28, 2024 at 04:01:49PM -0800, Kees Cook wrote:
> On Wed, Feb 28, 2024 at 02:41:48PM -0800, Jakub Kicinski wrote:
> > On Wed, 28 Feb 2024 13:46:10 -0800 Kees Cook wrote:
...
> But I still like the idea -- Gustavo has been solving these cases with
> having two structs, e.g.:
>
> struct net_device {
> ...unchanged...
> };
>
> struct net_device_alloc {
> struct net_device dev;
> u32 priv_size;
> u8 priv_data[] __counted_by(priv_size) __aligned(NETDEV_ALIGN);
> };
>
> And internals can use struct net_device_alloc...
I just realized that I made same approach in
f6d7f050e258 ("spi: Don't use flexible array in struct spi_message definition")
75e308ffc4f0 ("spi: Use struct_size() helper")
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists