Re: get_user_pages vs mmap MAP_FIXED bug

2007-05-08 Thread Nick Piggin
Hi Rusty! Rusty Russell wrote: On Tue, 2007-05-08 at 17:41 +1000, Nick Piggin wrote: Fancy that! Thanks for catching it Rusty, does the following work for you? Hi Nick, After 24 hours, it seems to be holding up (the original problem showed up in lguest, which uses get_user_pages ex

Re: get_user_pages vs mmap MAP_FIXED bug

2007-05-08 Thread Rusty Russell
On Tue, 2007-05-08 at 17:41 +1000, Nick Piggin wrote: > Fancy that! Thanks for catching it Rusty, does the following work for > you? Hi Nick, After 24 hours, it seems to be holding up (the original problem showed up in lguest, which uses get_user_pages extensively). Thanks! Rusty. - To

Re: get_user_pages vs mmap MAP_FIXED bug

2007-05-08 Thread Nick Piggin
Andrew Morton wrote: On Mon, 07 May 2007 11:26:44 +1000 Rusty Russell <[EMAIL PROTECTED]> wrote: On Sun, 2007-05-06 at 17:01 +1000, Rusty Russell wrote: This bug is in 2.6.21-rc7-mm2, but not 2.6.21. Haven't tested 2.6.21-mm1 yet. OK, 2.6.21-mm1 fails too. 2.6.21-git6 ... is fine. Here'

Re: get_user_pages vs mmap MAP_FIXED bug

2007-05-06 Thread Andrew Morton
On Mon, 07 May 2007 11:26:44 +1000 Rusty Russell <[EMAIL PROTECTED]> wrote: > On Sun, 2007-05-06 at 17:01 +1000, Rusty Russell wrote: > > This bug is in 2.6.21-rc7-mm2, but not 2.6.21. Haven't tested > > 2.6.21-mm1 yet. > > OK, 2.6.21-mm1 fails too. 2.6.21-git6 ... is fine. > > Here's a standa

Re: get_user_pages vs mmap MAP_FIXED bug

2007-05-06 Thread Rusty Russell
On Sun, 2007-05-06 at 17:01 +1000, Rusty Russell wrote: > This bug is in 2.6.21-rc7-mm2, but not 2.6.21. Haven't tested > 2.6.21-mm1 yet. OK, 2.6.21-mm1 fails too. 2.6.21-git6 ... is fine. Here's a standalone test using ptrace. No kernel module req'd. [EMAIL PROTECTED]:~/linux-2.6.21-

get_user_pages vs mmap MAP_FIXED bug

2007-05-06 Thread Rusty Russell
This bug is in 2.6.21-rc7-mm2, but not 2.6.21. Haven't tested 2.6.21-mm1 yet. The following kernel module uses get_user_pages() to look at user memory, and gets zeroed pages if they're not touched by userspace first. The test case seems a little sensitive to change (eg. mapping at a non-fixed add