lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Oct 2023 15:56:55 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jacob Keller <jacob.e.keller@...el.com>
Cc: <edward.cree@....com>, <linux-net-drivers@....com>,
 <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>, Edward
 Cree <ecree.xilinx@...il.com>, <netdev@...r.kernel.org>,
 <habetsm.xilinx@...il.com>, <sudheer.mogilappagari@...el.com>,
 <jdamato@...tly.com>, <andrew@...n.ch>, <mw@...ihalf.com>,
 <linux@...linux.org.uk>, <sgoutham@...vell.com>, <gakula@...vell.com>,
 <sbhatta@...vell.com>, <hkelam@...vell.com>, <saeedm@...dia.com>,
 <leon@...nel.org>
Subject: Re: [PATCH v4 net-next 2/7] net: ethtool: attach an XArray of
 custom RSS contexts to a netdevice

On Fri, 29 Sep 2023 11:17:53 -0700 Jacob Keller wrote:
> > +struct ethtool_rxfh_context {
> > +	u32 indir_size;
> > +	u32 key_size;
> > +	u8 hfunc;
> > +	u16 priv_size;
> > +	u8 indir_no_change:1;
> > +	u8 key_no_change:1;
> > +	/* private: driver private data, indirection table, and hash key are
> > +	 * stored sequentially in @data area.  Use below helpers to access.
> > +	 */
> > +	u8 data[] __aligned(sizeof(void *));
> > +};  
> 
> Is it not feasible to use container_of to get to private data for the
> drivers? I guess this change in particular doesn't actually include any
> users yet...

That could work in general but here specifically there are also 
2 variable-size arrays hiding in data[].

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ