* [PULL 0/1] Linux user next patches @ 2026-11-22 16:12 Helge Deller 2026-11-22 16:13 ` [PULL 1/1] linux-user: do not emulate PI futexes given endianness mismatch Helge Deller 2026-11-23 16:52 ` [PULL 0/1] Linux user next patches Richard Henderson 0 siblings, 2 replies; 3+ messages in thread From: Helge Deller @ 2026-11-22 16:12 UTC (permalink / raw) To: qemu-devel; +Cc: Helge Deller, Laurent Vivier, Pierrick Bouvier From: Helge Deller <deller@gmx.de> The following changes since commit 8f66cb79044c370e3813c56ceb7a75a5ca2d0a0e: Merge tag 'pull-tcg-20261120' of https://gitlab.com/rth7680/qemu into staging (2026-11-20 14:52:05 -0800) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git tags/linux-user-next-pull-request for you to fetch changes up to 31b27c0b645e8c596e69027d714ce075f1374792: linux-user: do not emulate PI futexes given endianness mismatch (2026-11-22 16:57:52 +0100) ---------------------------------------------------------------- linux user One PI futex patch from Barnabás Pőcze for linux-user. ---------------------------------------------------------------- Barnabás Pőcze (1): linux-user: do not emulate PI futexes given endianness mismatch linux-user/syscall.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.54.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PULL 1/1] linux-user: do not emulate PI futexes given endianness mismatch 2026-11-22 16:12 [PULL 0/1] Linux user next patches Helge Deller @ 2026-11-22 16:13 ` Helge Deller 2026-11-23 16:52 ` [PULL 0/1] Linux user next patches Richard Henderson 1 sibling, 0 replies; 3+ messages in thread From: Helge Deller @ 2026-11-22 16:13 UTC (permalink / raw) To: qemu-devel; +Cc: Helge Deller, Laurent Vivier, Pierrick Bouvier From: Barnabás Pőcze <pobrn@protonmail.com> For PI futexes, the futex word is expected to contain the thread id in native byte order. And failing to emulate that leads to issues as e.g. glibc does not expect `ESRCH` to be returned from a `FUTEX_LOCK_PI` operation. If the mutex is set to be "robust", then this is detected as unrecoverable failure and glibc aborts (since a robust mutex should've been unlocked by the kernel when the owner dies): Fatal glibc error: pthread_mutex_lock.c:450 (__pthread_mutex_lock_full): assertion failed: e != ESRCH || !robust qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped) Since `FUTEX_LOCK_PI{,2}` cannot be easily emulated when the host and target endianness differs, do not handle them, and return `ENOSYS`. This allows e.g. glibc to detect that they do not work and handle things accordingly. Link: https://gitlab.com/qemu-project/qemu/-/work_items/4911 Cc: qemu-stable@nongnu.org Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Helge Deller <deller@gmx.de> Tested-by: Helge Deller <deller@gmx.de> # on 32-bit parisc big endian guest Signed-off-by: Helge Deller <deller@gmx.de> --- linux-user/syscall.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 350e69e2d0..d2a6cfb454 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8243,6 +8243,7 @@ static int do_futex(CPUState *cpu, bool time64, target_ulong uaddr, case FUTEX_WAIT_BITSET: val = tswap32(val); break; +#if HOST_BIG_ENDIAN == TARGET_BIG_ENDIAN case FUTEX_WAIT_REQUEUE_PI: val = tswap32(val); haddr2 = g2h(cpu, uaddr2); @@ -8250,10 +8251,11 @@ static int do_futex(CPUState *cpu, bool time64, target_ulong uaddr, case FUTEX_LOCK_PI: case FUTEX_LOCK_PI2: break; - case FUTEX_WAKE: - case FUTEX_WAKE_BITSET: case FUTEX_TRYLOCK_PI: case FUTEX_UNLOCK_PI: +#endif + case FUTEX_WAKE: + case FUTEX_WAKE_BITSET: timeout = 0; break; case FUTEX_FD: @@ -8261,7 +8263,9 @@ static int do_futex(CPUState *cpu, bool time64, target_ulong uaddr, timeout = 0; break; case FUTEX_CMP_REQUEUE: +#if HOST_BIG_ENDIAN == TARGET_BIG_ENDIAN case FUTEX_CMP_REQUEUE_PI: +#endif val3 = tswap32(val3); /* fall through */ case FUTEX_REQUEUE: -- 2.54.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PULL 0/1] Linux user next patches 2026-11-22 16:12 [PULL 0/1] Linux user next patches Helge Deller 2026-11-22 16:13 ` [PULL 1/1] linux-user: do not emulate PI futexes given endianness mismatch Helge Deller @ 2026-11-23 16:52 ` Richard Henderson 1 sibling, 0 replies; 3+ messages in thread From: Richard Henderson @ 2026-11-23 16:52 UTC (permalink / raw) To: Helge Deller, qemu-devel; +Cc: Helge Deller, Laurent Vivier, Pierrick Bouvier On 11/22/26 08:12, Helge Deller wrote: > From: Helge Deller<deller@gmx.de> > > The following changes since commit 8f66cb79044c370e3813c56ceb7a75a5ca2d0a0e: > > Merge tag 'pull-tcg-20261120' ofhttps://gitlab.com/rth7680/qemu into staging (2026-11-20 14:52:05 -0800) > > are available in the Git repository at: > > https://github.com/hdeller/qemu-hppa.git tags/linux-user-next-pull-request > > for you to fetch changes up to 31b27c0b645e8c596e69027d714ce075f1374792: > > linux-user: do not emulate PI futexes given endianness mismatch (2026-11-22 16:57:52 +0100) > > ---------------------------------------------------------------- > linux user > > One PI futex patch from Barnabás Pőcze for linux-user. Applied, thanks. r~ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-23 16:52 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-22 16:12 [PULL 0/1] Linux user next patches Helge Deller 2026-11-22 16:13 ` [PULL 1/1] linux-user: do not emulate PI futexes given endianness mismatch Helge Deller 2026-11-23 16:52 ` [PULL 0/1] Linux user next patches Richard Henderson
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.