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] [day] [month] [year] [list]
Message-ID: <20240317084144.GF12921@unreal>
Date: Sun, 17 Mar 2024 10:41:44 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>,
	Jason Gunthorpe <jgg@...pe.ca>, kuba@...nel.org,
	keescook@...omium.org,
	"open list:HFI1 DRIVER" <linux-rdma@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] IB/hfi1: allocate dummy net_device dynamically

On Fri, Mar 15, 2024 at 10:51:46AM -0700, Breno Leitao wrote:
> On Fri, Mar 15, 2024 at 12:12:15PM -0400, Dennis Dalessandro wrote:
> > On 3/13/24 6:33 AM, Breno Leitao wrote:
> > > struct net_device shouldn't be embedded into any structure, instead,
> > > the owner should use the priv space to embed their state into net_device.
> > > 
> > > Embedding net_device into structures prohibits the usage of flexible
> > > arrays in the net_device structure. For more details, see the discussion
> > > at [1].
> > > 
> > > Un-embed the net_device from struct hfi1_netdev_rx by converting it
> > > into a pointer. Then use the leverage alloc_netdev() to allocate the
> > > net_device object at hfi1_alloc_rx().
> > > 
> > > [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/
> > > 
> > > Signed-off-by: Breno Leitao <leitao@...ian.org>
> > > 
> > > ----
> > > PS: this diff needs d160c66cda0ac8614 ("net: Do not return value from
> > > init_dummy_netdev()") in order to apply and build cleanly.
> > > ---
> > > Changelog:
> > > 
> > > v2:
> > > 	* Free struct hfi1_netdev_rx allocation if alloc_netdev() fails
> > > 	* Pass zero as the private size for alloc_netdev().
> > > 	* Remove wrong reference for iwl in the comments
> > > ---
> > 
> > Very lightly tested, but interface came up and I could send traffic. Code seems
> > OK too.
> > 
> > I'd prefer to at least remove the first sentence of the commit message.
> 
> That is OK for me. Would you like to remove it when merging it, or,
> would you prefer me to resend it?

Please resend together with Dennis's Acked-by.

Thanks

> 
> Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ