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:	Tue, 15 Mar 2011 11:15:54 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Manfred Spraul <manfred@...orfullife.com>
Subject: Re: [PATCH V4 1/1] rcu: introduce kfree_rcu()

On Tuesday 15 March 2011 10:46:20 Lai Jiangshan wrote:
> +static __always_inline bool __is_kfree_rcu_offset(unsigned long offset)
> +{
> +       return offset < 4096;
> +}

So this relies on the assumptions that 

a) the rcu_head is within the first 4 KB of the data structure to be freed
b) no callback ever gets called in the first 4 KB of virtual address space

It's probably a reasonable assumption, but I think it should be documented
more explicitly, especially the first one. It's entirely possible that
an RCU managed data structure is larger than 4 KB.
Another alternative might be to encode the difference between a
function pointer and an offset in one of the lower bits of the address.

	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