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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110316043817.GH2273@linux.vnet.ibm.com>
Date:	Tue, 15 Mar 2011 21:38:17 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	Manfred Spraul <manfred@...orfullife.com>
Subject: Re: [PATCH V4 1/1] rcu: introduce kfree_rcu()

On Wed, Mar 16, 2011 at 10:58:14AM +0800, Lai Jiangshan wrote:
> On 03/15/2011 09:07 PM, Arnd Bergmann wrote:
> > On Tuesday 15 March 2011, Paul E. McKenney wrote:
> >> And it makes use of statically allocated structures a bit clunky.
> > 
> > How do statically allocated structures relate to this? I would
> > expect that you never call kfree_rcu on them, so it shouldn't
> > matter.
> > 
> >> Yet another approach is to use the low-order bit of the rcu_head pointer,
> >> given that the rcu_head structure does have to be aligned.  If this bit
> >> is set, then the function pointer could be interpreted as an offset.
> >> This approach might also allow a slab_free_rcu() to be constructed, given
> >> that the full 32 bits of the function pointer would be available.
> >> For example, if the upper 16 bits are zero, the low-order 16 bits are
> >> the offset.  If the upper 16 bits are 0x1, then the low-order 16 bits
> >> might be an index that selects the desired slab cache.
> > 
> > This solution sounds like a clear improvement over the patch that Lai
> > Jiangshan posted, without any downsides.
> 
> This solution is good, but it changes too much code, I think we will switch to
> this solution until my posted solution can't work under some real bad situation
> happened.

Indeed, the bit patterns are totally internal to this patch, so we can
change as needed -- for example, if we later want to apply this same
technique to slab_free() as well as kfree().

							Thanx, Paul
--
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