The linux 6.6 kernel added a new syscall fchmodat2 which is a variant of fchmodat with an extra flag argument: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=09da082b07bbae1c11d9560c8502800039aebcea https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78252deb023cf0879256fcfbafe37022c390762b https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78252deb023cf0879256fcfbafe37022c390762b glibc will probably start using it in the next release (2.39): https://inbox.sourceware.org/libc-alpha/20230928165621.372548-1-adhemerval.zanella@linaro.org/
Created attachment 163278 [details] Add fchmodat2 syscall on linux Initial, untested, patch.
Tested on a linux 6.6 kernel (x86_64) and pushed as: commit 372d09fd9a8d76847c81092ebff71c80fd6c145d Author: Mark Wielaard <mark@klomp.org> Date: Sat Nov 18 21:17:02 2023 +0100 Add fchmodat2 syscall on linux fchmodat2 is a new syscall on linux 6.6. It is a variant of fchmodat that takes an extra flags argument. https://bugs.kde.org/show_bug.cgi?id=477198
Also added to the VALGRIND_3_22_BRANCH as: commit a43e62dddcf51ec6578a90c5988a41e856b44b05 (HEAD -> VALGRIND_3_22_BRANCH) Author: Mark Wielaard <mark@klomp.org> Date: Sat Nov 18 21:17:02 2023 +0100 Add fchmodat2 syscall on linux fchmodat2 is a new syscall on linux 6.6. It is a variant of fchmodat that takes an extra flags argument. https://bugs.kde.org/show_bug.cgi?id=477198 (cherry picked from commit 372d09fd9a8d76847c81092ebff71c80fd6c145d)