Thread (69 messages) 69 messages, 9 authors, 2011-08-08

Re: [RFC/PATCH] mm/futex: Fix futex writes on archs with SW tracking of dirty & young

From: Mike Frysinger <hidden>
Date: 2011-07-27 06:51:08
Also in: lkml

On Mon, Jul 18, 2011 at 21:29, Benjamin Herrenschmidt wrote:
The futex code currently attempts to write to user memory within
a pagefault disabled section, and if that fails, tries to fix it
up using get_user_pages().

This doesn't work on archs where the dirty and young bits are
maintained by software, since they will gate access permission
in the TLB, and will not be updated by gup().

In addition, there's an expectation on some archs that a
spurious write fault triggers a local TLB flush, and that is
missing from the picture as well.

I decided that adding those "features" to gup() would be too much
for this already too complex function, and instead added a new
simpler fixup_user_fault() which is essentially a wrapper around
handle_mm_fault() which the futex code can call.
unfortunately, this breaks all nommu ports.  you added
fixup_user_fault() to mm/memory.c only which is not used by nommu
logic.
-mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help