linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/9] futex: Create {set,get}_robust_list2() syscalls
@ 2025-11-22  5:50 André Almeida
  2025-11-22  5:50 ` [PATCH v6 1/9] futex: Use explicit sizes for compat_robust_list structs André Almeida
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: André Almeida @ 2025-11-22  5:50 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart,
	Davidlohr Bueso, Arnd Bergmann, Sebastian Andrzej Siewior,
	Waiman Long, Ryan Houdek
  Cc: linux-kernel, linux-kselftest, linux-api, kernel-dev,
	André Almeida

Hello,

This version is a complete rewrite of the syscall (thanks Thomas for the
suggestions!). 

 * Use case

The use-case for the new syscalls is detailed in the last patch version:

  https://lore.kernel.org/lkml/20250626-tonyk-robust_futex-v5-0-179194dbde8f@igalia.com

 * The syscall interface

Documented at patches 3/9 "futex: Create set_robust_list2() syscall" and
4/9 "futex: Create get_robust_list2() syscall".

 * Testing

I expanded the current robust list selftest to use the new interface,
and also ported the original syscall to use the new syscall internals,
and everything survived the tests.

 * Changelog

Changes from v5:
 - Complete interface rewrite, there are so many changes but the main
   ones are the following points
 - Array of robust lists now has a static size, allocated once during the
   first usage of the list
 - Now that the list of robust lists have a fixed size, I removed the
   logic of having a command for creating a new index on the list. To
   simplify things for everyone, userspace just need to call
   set_robust_list2(head, 32-bit/64-bit type, index).
 - Created get_robust_list2()
 - The new code can be better integrated with the original interface
 - v5: https://lore.kernel.org/r/20250626-tonyk-robust_futex-v5-0-179194dbde8f@igalia.com

Feedback is very welcomed!

---
André Almeida (9):
      futex: Use explicit sizes for compat_robust_list structs
      futex: Make exit_robust_list32() unconditionally available for 64-bit kernels
      futex: Create set_robust_list2() syscall
      futex: Create get_robust_list2() syscall
      futex: Wire up set_robust_list2 syscall
      futex: Wire up get_robust_list2 syscall
      selftests/futex: Expand for set_robust_list2()
      selftests/futex: Expand for get_robust_list2()
      futex: Use new robust list API internally

 arch/alpha/kernel/syscalls/syscall.tbl             |   2 +
 arch/arm/tools/syscall.tbl                         |   2 +
 arch/m68k/kernel/syscalls/syscall.tbl              |   2 +
 arch/microblaze/kernel/syscalls/syscall.tbl        |   2 +
 arch/mips/kernel/syscalls/syscall_n32.tbl          |   2 +
 arch/mips/kernel/syscalls/syscall_n64.tbl          |   2 +
 arch/mips/kernel/syscalls/syscall_o32.tbl          |   2 +
 arch/parisc/kernel/syscalls/syscall.tbl            |   2 +
 arch/powerpc/kernel/syscalls/syscall.tbl           |   2 +
 arch/s390/kernel/syscalls/syscall.tbl              |   2 +
 arch/sh/kernel/syscalls/syscall.tbl                |   2 +
 arch/sparc/kernel/syscalls/syscall.tbl             |   2 +
 arch/x86/entry/syscalls/syscall_32.tbl             |   2 +
 arch/x86/entry/syscalls/syscall_64.tbl             |   2 +
 arch/xtensa/kernel/syscalls/syscall.tbl            |   2 +
 include/linux/compat.h                             |  13 +-
 include/linux/futex.h                              |  30 +-
 include/linux/sched.h                              |   6 +-
 include/uapi/asm-generic/unistd.h                  |   7 +-
 include/uapi/linux/futex.h                         |  26 ++
 kernel/futex/core.c                                | 140 ++++--
 kernel/futex/syscalls.c                            | 134 +++++-
 kernel/sys_ni.c                                    |   2 +
 scripts/syscall.tbl                                |   1 +
 .../selftests/futex/functional/robust_list.c       | 504 +++++++++++++++++++--
 25 files changed, 788 insertions(+), 105 deletions(-)
---
base-commit: c42ba5a87bdccbca11403b7ca8bad1a57b833732
change-id: 20250225-tonyk-robust_futex-60adeedac695

Best regards,
-- 
André Almeida <andrealmeid@igalia.com>


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

end of thread, other threads:[~2025-11-22  7:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-22  5:50 [PATCH v6 0/9] futex: Create {set,get}_robust_list2() syscalls André Almeida
2025-11-22  5:50 ` [PATCH v6 1/9] futex: Use explicit sizes for compat_robust_list structs André Almeida
2025-11-22  5:50 ` [PATCH v6 2/9] futex: Make exit_robust_list32() unconditionally available for 64-bit kernels André Almeida
2025-11-22  5:50 ` [PATCH v6 3/9] futex: Create set_robust_list2() syscall André Almeida
2025-11-22  5:50 ` [PATCH v6 4/9] futex: Create get_robust_list2() syscall André Almeida
2025-11-22  5:50 ` [PATCH v6 5/9] futex: Wire up set_robust_list2 syscall André Almeida
2025-11-22  5:50 ` [PATCH v6 6/9] futex: Wire up get_robust_list2 syscall André Almeida
2025-11-22  6:49   ` kernel test robot
2025-11-22  7:32   ` kernel test robot
2025-11-22  7:44   ` kernel test robot
2025-11-22  5:50 ` [PATCH v6 7/9] selftests/futex: Expand for set_robust_list2() André Almeida
2025-11-22  5:50 ` [PATCH v6 8/9] selftests/futex: Expand for get_robust_list2() André Almeida
2025-11-22  5:50 ` [PATCH v6 9/9] futex: Use new robust list API internally André Almeida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).