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: <1261004224.21028.500.camel@laptop>
Date:	Wed, 16 Dec 2009 23:57:04 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>, cl@...ux-foundation.org,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"mingo@...e.hu" <mingo@...e.hu>, minchan.kim@...il.com
Subject: Re: [mm][RFC][PATCH 0/11] mm accessor updates.

On Wed, 2009-12-16 at 19:31 +0900, KAMEZAWA Hiroyuki wrote:

> The problem of range locking is more than mmap_sem, anyway. I don't think
> it's possible easily.

We already have a natural range lock in the form of the split pte lock.

If we make the vma lookup speculative using RCU, we can use the pte lock
to verify we got the right vma, because munmap requires the pte lock to
complete the unmap.

The fun bit is dealing with the fallout if we got it wrong, since we
might then have instantiated page-tables not covered by a vma just to
take the pte lock, it also requires we RCU free the page-tables iirc.

There are a few interesting cases like stack extention and hugetlbfs,
but I think we could start by falling back to mmap_sem locked behaviour
if the speculative thing fails.

As to the proposed patches, I tend to agree that simply wrapping the
mmap_sem semantics in different accessors is pointless, expressing the
same semantics in different ways really doesn't help.


--
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