Re: [PATCH] powerpc: Fix bug in __futex_atomic_op

2009-04-15 Thread Norbert van Bolhuis
I'd like to understand the implications of this bug. Obviously applications using the futex system can be affected, but does anybody know whether GNU software packages suffer from this problem. I mean glibc (nptl) uses futexes, so does gdb and gcc. will this bug hurt them ? Paul Mackerras wrot

Re: [PATCH] powerpc: Fix bug in __futex_atomic_op

2009-04-14 Thread Richard Henderson
Paul Mackerras wrote: Can anyone see any reason why the FUTEX_OP_SET case can't just do a __put_user? Because you need to return the old value. Despite the name, it's an exchange operation not a set. r~ ___ Linuxppc-dev mailing list Linuxppc-dev@oz

[PATCH] powerpc: Fix bug in __futex_atomic_op

2009-04-13 Thread Paul Mackerras
Richard Henderson pointed out that the powerpc __futex_atomic_op has a bug: it will write the wrong value if the stwcx. fails and it has to retry the lwarx/stwcx. loop, since 'oparg' will have been overwritten by the result from the first time around the loop. This happens because it uses the same