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: <1175865300.6483.183.camel@twins>
Date:	Fri, 06 Apr 2007 15:15:00 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Hugh Dickins <hugh@...itas.com>
Cc:	Eric Dumazet <dada1@...mosbay.com>,
	Ulrich Drepper <drepper@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dave Jones <davej@...hat.com>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Ingo Molnar <mingo@...e.hu>, Andi Kleen <ak@...e.de>,
	Ravikiran G Thirumalai <kiran@...lex86.org>,
	"Shai Fultheim (Shai@...lex86.org)" <shai@...lex86.org>,
	pravin b shelar <pravin.shelar@...softinc.com>,
	linux-kernel@...r.kernel.org,
	"Pierre.Peiffer" <Pierre.Peiffer@...l.net>
Subject: Re: Shared futexes (was [PATCH] FUTEX : new PRIVATE futexes)

On Fri, 2007-04-06 at 14:02 +0100, Hugh Dickins wrote:
> On Fri, 6 Apr 2007, Peter Zijlstra wrote:
> > 
> > some thoughts on shared futexes;
> > 
> > Could we get rid of the mmap_sem on the shared futexes in the following
> > manner:
> > 
> >  - do a page table walk to find the pte;
> 
> ("walk" meaning descent down the levels, I presume, rather than across)

indeed.

> I've not had time to digest your proposal, and I'm about to go out:
> let me sound a warning that springs to mind, maybe it's entirely
> inapproriate, but better said than kept silent.
> 
> It looks as if you're supposing that mmap_sem is needed to find_vma,
> but not for going down the pagetables.  It's not a simple as that:
> you need to be careful that a concurrent munmap from another thread
> isn't freeing pagetables from under you.
> 
> Holding (down_read) of mmap_sem is one way to protect against that.
> try_to_unmap doesn't have that luxury: in its case, it's made safe
> by the way free_pgtables does anon_vma_unlink and unlink_file_vma
> before freeing any pagetables, so try_to_unmap etc. won't get there;
> but you can't do that.

Ah, drad.

I had hoped that the pte_lock would solve that race, but that doesn't
cover the upper levels of the tree.

Back to the drawing board..

-
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