Hey Linus, /* Summary */ This adds a copy_struct_to_user() helper which is a companion helper to the already widely used copy_struct_from_user(). It copies a struct from kernel space to userspace, in a way that guarantees backwards-compatibility for struct syscall arguments as long as future struct extensions are made such that all new fields are appended to the old struct, and zeroed-out new fields have the same meaning as the old struct. The first user is sched_getattr() system call but once the pidfs updates for this cycle have landed the new extensible ioctl will be ported to it as well. /* Testing */ gcc version 14.2.0 (Debian 14.2.0-6) Debian clang version 16.0.6 (27+b1) All patches are based on v6.12-rc3 and have been sitting in linux-next. No build failures or warnings were observed. /* Conflicts */ Merge conflicts with mainline ============================= No known conflicts. Merge conflicts with other trees ================================ No known conflicts. The following changes since commit 8e929cb546ee42c9a61d24fae60605e9e3192354: Linux 6.12-rc3 (2024-10-13 14:33:32 -0700) are available in the Git repository at: git@xxxxxxxxxxxxxxxxxxx:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.usercopy for you to fetch changes up to 112cca098a7010c02a4d535a253af72e4e5bbd06: sched_getattr: port to copy_struct_to_user (2024-10-21 16:51:31 +0200) Please consider pulling these changes from the signed vfs-6.13.usercopy tag. Thanks! Christian ---------------------------------------------------------------- vfs-6.13.usercopy ---------------------------------------------------------------- Aleksa Sarai (2): uaccess: add copy_struct_to_user helper sched_getattr: port to copy_struct_to_user include/linux/uaccess.h | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/syscalls.c | 42 +-------------------- 2 files changed, 99 insertions(+), 40 deletions(-)