All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT pull] locking/urgent for v6.16-rc7
@ 2025-07-20 12:04 Thomas Gleixner
  2025-07-20 12:04 ` [GIT pull] sched/urgent " Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Thomas Gleixner @ 2025-07-20 12:04 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, x86

Linus,

please pull the latest locking/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-2025-07-20

up to:  d0a48dc4df5c: selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode

A single fix for the futex selftest code to make 32-bit user space work
correctly on 64-bit kernels. sys_futex_wait() expects a struct
__kernel_timespec for the timeout, but the selftest uses struct timespec,
which is the original 32-bit non 2038 compliant variant. Fix it up by
converting the callsite supplied timespec to a __kernel_timespec and hand
that into the syscall.

Thanks,

	tglx

------------------>
Terry Tritton (1):
      selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode


 tools/testing/selftests/futex/include/futex2test.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/futex/include/futex2test.h b/tools/testing/selftests/futex/include/futex2test.h
index ea79662405bc..1f625b39948a 100644
--- a/tools/testing/selftests/futex/include/futex2test.h
+++ b/tools/testing/selftests/futex/include/futex2test.h
@@ -4,6 +4,7 @@
  *
  * Copyright 2021 Collabora Ltd.
  */
+#include <linux/time_types.h>
 #include <stdint.h>
 
 #define u64_to_ptr(x) ((void *)(uintptr_t)(x))
@@ -65,7 +66,12 @@ struct futex32_numa {
 static inline int futex_waitv(volatile struct futex_waitv *waiters, unsigned long nr_waiters,
 			      unsigned long flags, struct timespec *timo, clockid_t clockid)
 {
-	return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, timo, clockid);
+		struct __kernel_timespec ts = {
+			.tv_sec = timo->tv_sec,
+			.tv_nsec = timo->tv_nsec,
+		};
+
+		return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, &ts, clockid);
 }
 
 /*


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-08-21  9:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-20 12:04 [GIT pull] locking/urgent for v6.16-rc7 Thomas Gleixner
2025-07-20 12:04 ` [GIT pull] sched/urgent " Thomas Gleixner
2025-07-20 18:20   ` Linus Torvalds
2025-08-21  9:36     ` Peter Zijlstra
2025-07-20 18:38   ` pr-tracker-bot
2025-07-20 12:05 ` [GIT pull] x86/urgent " Thomas Gleixner
2025-07-20 18:35   ` Linus Torvalds
2025-07-21  3:14     ` Ard Biesheuvel
2025-07-21  3:32       ` Linus Torvalds
2025-07-21  4:17         ` Ard Biesheuvel
2025-07-21  6:08     ` tglx
2025-07-21  6:25       ` Ard Biesheuvel
2025-07-20 18:38   ` pr-tracker-bot
2025-07-20 18:38 ` [GIT pull] locking/urgent " pr-tracker-bot

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.