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]
Message-Id: <201005061609.25960.arnd@arndb.de>
Date:	Thu, 6 May 2010 16:09:25 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	paulmck@...ux.vnet.ibm.com
Cc:	Stephen Hemminger <shemminger@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, josh@...htriplett.org,
	dvhltc@...ibm.com, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH tip/core/rcu 28/48] net: Make accesses to ->br_port safe for sparse RCU

On Thursday 06 May 2010, Paul E. McKenney wrote:
> On Tue, May 04, 2010 at 11:41:49PM +0200, Arnd Bergmann wrote:
> > On Tuesday 04 May 2010 23:26:31 Stephen Hemminger wrote:
> > > > The new versions of the rcu_dereference() APIs requires that any pointers
> > > > passed to one of these APIs be fully defined.  The ->br_port field
> > > > in struct net_device points to a struct net_bridge_port, which is an
> > > > incomplete type.  This commit therefore changes ->br_port to be a void*,
> > > > and introduces a br_port() helper function to convert the type to struct
> > > > net_bridge_port, and applies this new helper function where required.
> > > 
> > > I would rather make the bridge hook generic and not take a type argument.
> > 
> > Not sure if you were confused by the comment in the same way that I was.
> > 
> > The bridge hook is not impacted by this at all, since we can either pass
> > a void* or a struct net_bridge_port* to it. The br_port() helper
> > is used for all the places where we actually want to dereference 
> > dev->br_port and access its contents.
> 
> What should I change in the commit message to clear this up?
> 
> Of course, if the code needs to change, please let me know what should
> change there as well.

I think it's both ok, I was mostly confused by the discussion we had earlier.
Maybe add a sentence like:

 The br_handle_frame_hook now needs a forward declaration of struct net_bridge_port.

Or you just change br_handle_frame_hook to take a void* to avoid the forward
declaration. Not sure what Stephen was referring to really.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ