Re: [PATCH v6 0/9] futex: Create {set,get}_robust_list2() syscalls

André Almeida
2025-11-22T14:26:12Z

Em 22/11/2025 02:50, André Almeida escreveu:
> 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).

Actually, this won't work well. The application that calls
set_robust_list2() may be using glibc, that will also want to call
set_robust_list2(), and there's no way to know which lists are being by
each library. I will re-add the create/modify logic for the next version.