Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Nick Piggin
Eric Dumazet wrote: On Wed, 11 Apr 2007 19:23:26 +1000 Nick Piggin <[EMAIL PROTECTED]> wrote: As this external thing certainly is not doing the check itself, to be on the safe side we should enforce it in get_futex_key(). I agree with you : If we want to maximize performance, we could say :

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Eric Dumazet
On Wed, 11 Apr 2007 19:23:26 +1000 Nick Piggin <[EMAIL PROTECTED]> wrote: > But... that isn't there in mainline. Why is it in -mm? At any rate, that makes > it a no brainer to change. Seems to be related to lguest. Ask Rusty :) > > > > > As this external thing certainly is not doing the check

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Nick Piggin
Pierre Peiffer wrote: Nick Piggin a écrit : But... that isn't there in mainline. Why is it in -mm? This was introduced by lguest code I did not follow exaclty why. OK, that's no problem, then it can remain exported but we just have to document and audit that callers must pass in an al

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Nick Piggin
Nick Piggin wrote: Pierre Peiffer wrote: Nick Piggin a écrit : But... that isn't there in mainline. Why is it in -mm? This was introduced by lguest code I did not follow exaclty why. OK, that's no problem, then it can remain exported but we just have to document and audit that cal

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Pierre Peiffer
Nick Piggin a écrit : But... that isn't there in mainline. Why is it in -mm? This was introduced by lguest code I did not follow exaclty why. Pierre At any rate, that makes it a no brainer to change. As this external thing certainly is not doing the check itself, to be on the safe

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Nick Piggin
Eric Dumazet wrote: On Wed, 11 Apr 2007 17:22:57 +1000 Nick Piggin <[EMAIL PROTECTED]> wrote: Eric Dumazet wrote: On Sat, 07 Apr 2007 19:30:14 +1000 Nick Piggin <[EMAIL PROTECTED]> wrote: Eric Dumazet wrote: - Current mm code have a problem with 64bit futexes, as spoted by Nick :

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Eric Dumazet
On Wed, 11 Apr 2007 17:22:57 +1000 Nick Piggin <[EMAIL PROTECTED]> wrote: > Eric Dumazet wrote: > > On Sat, 07 Apr 2007 19:30:14 +1000 > > Nick Piggin <[EMAIL PROTECTED]> wrote: > > > > > >>Eric Dumazet wrote: > > > > > > > >>>- Current mm code have a problem with 64bit futexes, as spoted by

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Nick Piggin
Eric Dumazet wrote: On Sat, 07 Apr 2007 19:30:14 +1000 Nick Piggin <[EMAIL PROTECTED]> wrote: Eric Dumazet wrote: - Current mm code have a problem with 64bit futexes, as spoted by Nick : get_futex_key() does a check against sizeof(u32) regardless of futex being 64bits or not. So it is

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-10 Thread Eric Dumazet
On Sat, 7 Apr 2007 15:15:56 -0700 Andrew Morton <[EMAIL PROTECTED]> wrote: > On Sat, 7 Apr 2007 10:43:39 +0200 Eric Dumazet <[EMAIL PROTECTED]> wrote: > > > > get_futex_key() does a check against sizeof(u32) regardless of futex being > > 64bits or not. > > So it is possible a 64bit futex spans t

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-07 Thread Andrew Morton
On Sat, 7 Apr 2007 10:43:39 +0200 Eric Dumazet <[EMAIL PROTECTED]> wrote: > Hi all > > Updates on this take4 : > > - All remarks from Nick were addressed I hope > > - Current mm code have a problem with 64bit futexes, as spoted by Nick : > > get_futex_key() does a check against sizeof(u32) reg

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-07 Thread Ulrich Drepper
On 4/7/07, Eric Dumazet <[EMAIL PROTECTED]> wrote: I am not sure what you want to say. What Jakub meant is that it is OK for the kernel to reject using unaligned 64-bit futexes. Just return an error in all cases (not just in some). - To unsubscribe from this list: send the line "unsubscribe li

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-07 Thread Eric Dumazet
Jakub Jelinek a écrit : On Sat, Apr 07, 2007 at 10:43:39AM +0200, Eric Dumazet wrote: get_futex_key() does a check against sizeof(u32) regardless of futex being 64bits or not. So it is possible a 64bit futex spans two pages of memory... That would be a user bug. 32-bit futexes have to be 32-

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-07 Thread Jakub Jelinek
On Sat, Apr 07, 2007 at 10:43:39AM +0200, Eric Dumazet wrote: > get_futex_key() does a check against sizeof(u32) regardless of futex being > 64bits or not. > So it is possible a 64bit futex spans two pages of memory... That would be a user bug. 32-bit futexes have to be 32-bit aligned, 64-bit fu

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-07 Thread Eric Dumazet
On Sat, 07 Apr 2007 19:30:14 +1000 Nick Piggin <[EMAIL PROTECTED]> wrote: > Eric Dumazet wrote: > > > > - Current mm code have a problem with 64bit futexes, as spoted by Nick : > > > > get_futex_key() does a check against sizeof(u32) regardless of futex being > > 64bits or not. > > So it is p

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-07 Thread Nick Piggin
Eric Dumazet wrote: Hi all Updates on this take4 : - All remarks from Nick were addressed I hope Yeah looks very nice. Thanks for doing that. - Current mm code have a problem with 64bit futexes, as spoted by Nick : get_futex_key() does a check against sizeof(u32) regardless of futex being

[PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-07 Thread Eric Dumazet
Hi all Updates on this take4 : - All remarks from Nick were addressed I hope - Current mm code have a problem with 64bit futexes, as spoted by Nick : get_futex_key() does a check against sizeof(u32) regardless of futex being 64bits or not. So it is possible a 64bit futex spans two pages of mem