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-next>] [day] [month] [year] [list]
Date:	Fri, 05 Oct 2007 02:05:32 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Keir Fraser <Keir.Fraser@...source.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickens <hugh@...itas.com>,
	David Rientjes <rientjes@...gle.com>,
	Zachary Amsden <zach@...are.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Rusty Russell <rusty@...tcorp.com.au>, Andi Kleen <ak@...e.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: race with page_referenced_one->ptep_test_and_clear_young and
 pagetable setup/pulldown

Keir Fraser wrote:
>
> Hang on! How is the access unlocked? By my reading
> page_referenced_one()->page_check_address()->spin_lock(pte_lockptr()).
>

Ah, OK.  I'd overlooked that.

> The problem here is most likely insufficient locking in the pin/unpin
> table-walking code, in light of the fact that you are probably running
> with
> per-page spinlocks (SPLIT_PTLOCK_CPUS). Because we nobble that option
> in our
> own kernel ports it suffices to take the page_table_lock when doing the
> walk-[un]pin-remap routine. This is *not* true with SPLIT_PTLOCK_CPUS.
>

Hm, I see.

> Fortuitously, Jan Beulich has a patch to fix this. It's not going to be
> directly applicable to 2.6.23-rc series, but should be easily ported:
> <http://lists.xensource.com/archives/html/xen-devel/2007-03/msg01200.html>.
>

OK, I can use that.


Andi says:
> Do I misread that patch or does it really walk the complete address
> space and try to take all possible locks? Isn't that very slow?
>   

That's pretty much what it has to do.  Pinning/unpinning walks the whole
pagetable anyway, so it shouldn't be much more expensive.  And they're
relatively rare operations (fork, exec, exit).

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