Re: [PATCH] futex: send SIGBUS if argument is not aligned on a four-byte boundary

2020-05-20 Thread Konstantin Khlebnikov
On 20/05/2020 01.53, Thomas Gleixner wrote: Konstantin Khlebnikov writes: Userspace implementations of mutexes (including glibc) in some cases retries operation without checking error code from syscall futex. This is good for performance because most errors are impossible when locking code tru

Re: [PATCH] futex: send SIGBUS if argument is not aligned on a four-byte boundary

2020-05-19 Thread Thomas Gleixner
Konstantin Khlebnikov writes: > Userspace implementations of mutexes (including glibc) in some cases > retries operation without checking error code from syscall futex. > This is good for performance because most errors are impossible when > locking code trusts itself. This argument is blantantl

Re: [PATCH] futex: send SIGBUS if argument is not aligned on a four-byte boundary

2020-05-19 Thread Carlos O'Donell
On Fri, May 15, 2020 at 1:50 PM Carlos O'Donell wrote: > This isn't fixed because this is the older code in pthread_mutex_lock > which we haven't ported to futex-internal.h yet, otherwise we would abort > the process. I filed this upstream as a QoI issue so I don't forget to port the existing cod

Re: [PATCH] futex: send SIGBUS if argument is not aligned on a four-byte boundary

2020-05-15 Thread Carlos O'Donell
On 5/15/20 12:27 PM, Peter Zijlstra wrote: > On Fri, May 15, 2020 at 06:36:47PM +0300, Konstantin Khlebnikov wrote: >> Userspace implementations of mutexes (including glibc) in some cases >> retries operation without checking error code from syscall futex. >> This is good for performance because mo

Re: [PATCH] futex: send SIGBUS if argument is not aligned on a four-byte boundary

2020-05-15 Thread Peter Zijlstra
On Fri, May 15, 2020 at 06:36:47PM +0300, Konstantin Khlebnikov wrote: > Userspace implementations of mutexes (including glibc) in some cases > retries operation without checking error code from syscall futex. > This is good for performance because most errors are impossible when > locking code tru

[PATCH] futex: send SIGBUS if argument is not aligned on a four-byte boundary

2020-05-15 Thread Konstantin Khlebnikov
Userspace implementations of mutexes (including glibc) in some cases retries operation without checking error code from syscall futex. This is good for performance because most errors are impossible when locking code trusts itself. Some errors which could came from outer code are handled automatic