[PATCH 00/23] Linux 7.2/7.3 updates and new system call wrappers

enh enh@google.com
Tue Nov 3 14:49:30 GMT 2026


On Tue, Nov 3, 2026 at 9:33 AM Adhemerval Zanella <
adhemerval.zanella@linaro.org> wrote:

> This series add the usual header updates for the kernel releases since
> the last sync (Linux 7.2 and 7.3), and wrappers for system calls that
> are currently only available through syscall.
>
> Patches from 1 to 11 are the Linux 7.2/7.3 sync:
>
>   - Patch 1 updates the syscall lists.  Linux 7.3 adds fchroot, and
>     Linux 7.2 adds no new system call.
>
>   - Patch 2 adds the fallback definition of EFTYPE (Linux 7.2), which
>     openat2 returns with OPENAT2_REGULAR.  errlist.h already has an
>     EFTYPE entry for Hurd, so without the fallback strerror (EFTYPE)
>     would depend on the kernel headers used to build glibc.
>
>   - Patch 3 adds OPENAT2_REGULAR (Linux 7.2) to bits/openat2.h, and
>     patch 4 adds O_EMPTYPATH (Linux 7.2) and FD_FAILFS_ROOT (Linux 7.3)
>     to bits/fcntl-linux.h.  The manual documents both new flags.
>
>   - Patches 5 and 6 add the new AArch64 HWCAP3 bits (Linux 7.2) and the
>     powerpc PPC_FEATURE2_ARCH_3_2 and PPC_FEATURE2_DMF bits (Linux 7.3).
>
>   - Patches 7 to 9 add definitions from earlier releases that the
>     previous syncs missed: the TCP_AO_* (Linux 6.7) and TCP_IS_MPTCP
>     (Linux 6.10) socket options to netinet/tcp.h, which already has the
>     TCP-AO structures; PTRACE_SET_SYSCALL_INFO (Linux 6.16) to
>     sys/ptrace.h, along with the new reserved and flags fields of struct
>     __ptrace_syscall_info; and FD_INVALID (Linux 6.17) to
>     bits/fcntl-linux.h.
>
>   - Patches 10 and 11 update the header constant tests and
>     build-many-glibcs.py to Linux 7.3.
>
> Linux 7.3 also drops PER_HPUX from <linux/personality.h>, which glibc
> keeps in <sys/personality.h> for compatibility.  The new
> SO_RIGHTS_NOTRUNC socket option comes from <asm/socket.h>, so it needs
> no change.
>
> This patchset also improves the syscall wrappers support, following the
> priority list from Carlos and Florian presentation at Linux Plumbers [1].
> Patches 12-23 add wrappers for system calls that are neither provided
> by a dedicated library nor tied to state owned by glibc.  The futex
> wrappers from the same list (futex_wait, futex_timedwait, futex_wake,
> futex_requeue, and futex_waitv) are not included [2].
>
>   - membarrier (Linux 4.3), in the new <sys/membarrier.h> (patch 12).
>     It uses the three-argument signature, which has been stable since
>     Linux 5.10 added the cpu_id argument (the change Florian mentioned
>     at LPC).  Florian, if you prefer to finish your version, I can drop
>     this one.
>
>   - fchroot (Linux 7.3), patch 13.
>
>   - open_tree_attr (Linux 6.15), statmount and listmount (Linux 6.8),
>     in <sys/mount.h> (patches 14 and 15).
>
>   - setxattrat, getxattrat, listxattrat, and removexattrat (Linux 6.13),
>     in <sys/xattr.h> (patch 16).
>
>   - file_getattr and file_setattr (Linux 6.17), in the new
>     <sys/file_attr.h> (patch 17).
>
>   - quotactl_fd (Linux 5.14), in <sys/quota.h> (patch 18).
>
>   - memfd_secret (Linux 5.14), in <sys/mman.h> (patch 19).
>
>   - ioprio_get and ioprio_set (Linux 2.6.13), in the new <sys/ioprio.h>
>     (patch 20).
>
>   - kcmp (Linux 3.5), in the new <sys/kcmp.h> (patch 21).
>
>   - listns (Linux 6.19), in the new <sys/nsfs.h> (patch 22).
>
>   - cachestat (Linux 6.5), in <sys/mman.h> (patch 23).
>
> Two points deserve attention in the review:
>
>   - The header names:  <sys/ioprio.h> and <sys/kcmp.h> match the shims
>     systemd ships for these functions, and <sys/nsfs.h> is named after
>     <linux/nsfs.h>.  The <sys/membarrier.h> and <sys/file_attr.h> are my
>     choice.
>

fwiw, <sys/membarrier.h> is what bionic and musl already went with.


>   - With _GNU_SOURCE, <sys/mman.h> now includes <linux/mman.h> if it is
>     available (patch 23).  The kernel header defines the cachestat
>     structures without any macro to check for them, and it is included
>     along with <sys/mman.h> in either order, so it is the only way to
>     avoid redefinitions.  Both include orders build without warnings
>     with -Wall -Wextra on all architectures.  util-linux and LTP expect
>     the structures from <sys/mman.h> once they find the function.
>     util-linux builds with this change; LTP builds its cachestat tests
>     without _GNU_SOURCE, so it will need a small fix.
>
> The membarrier function is documented in the manual.  The other new
> functions are not, like the related functions glibc already provides
> (mount_setattr, mincore, process_madvise, and so on).
>
> With this series, 42 Linux system calls are still without a glibc
> wrapper:
>
>   - Handled by the separate <sys/futex.h>.
>
>   - Provided by a dedicated library or tool (25): programs use these
>     instead of the raw system calls, and libaio, libnuma, and
>     libkeyutils export functions with the same names, which a glibc
>     function would clash with:
>
>       - libaio: io_setup, io_submit, io_getevents, io_pgetevents,
>         io_pgetevents_time64, io_cancel, and io_destroy.
>       - libnuma: mbind, get_mempolicy, set_mempolicy,
>         set_mempolicy_home_node, migrate_pages, and move_pages.
>       - libkeyutils: add_key, request_key, and keyctl.
>       - liburing: io_uring_setup, io_uring_enter, and io_uring_register.
>       - libbpf: bpf.
>       - libseccomp: seccomp.
>       - perf: perf_event_open.
>       - kexec-tools: kexec_load and kexec_file_load.
>       - kmod: finit_module.
>
>   - Held back (2):  rseq_slice_yield (Linux 7.0) first needs
>     <sys/rseq.h> to be updated for the rseq time slice extension, and
>     Florian mentioned at LPC that he wants to add it.  For
>     get_robust_list, Florian argued at LPC that the robust list system
>     calls should not get wrappers; glibc only uses set_robust_list
>     internally.
>
>   - Possible follow-ups (7), on which I would like feedback first:
>
>       - userfaultfd.  The wrapper is trivial, but most of the interface
>         is ioctls on the returned descriptor, and Linux 6.1 added
>         /dev/userfaultfd as an alternative.
>       - landlock_create_ruleset, landlock_add_rule, and
>         landlock_restrict_self.  The ruleset attributes and access
>         rights grow in almost every release, so the glibc header could
>         only include <linux/landlock.h> and declare the functions.
>       - lsm_get_self_attr, lsm_set_self_attr, and lsm_list_modules,
>         which are mostly of interest to LSM tooling.
>
>   - Not meant for applications (4): restart_syscall, which the kernel
>     uses to restart interrupted system calls, and arc_gettls,
>     arc_usr_cmpxchg, and or1k_atomic, architecture helpers (TLS pointer
>     access and atomic operation emulation) that the glibc ports do not
>     use.
>
> Checked on x86_64-linux-gnu.  Patches 1-6 and 10-21 were also checked
> (check-abi and the new tests) on aarch64, alpha, arm, hppa, loongarch64,
> mips (o32, n32, and n64), powerpc, powerpc64, powerpc64le, riscv64, and
> s390x, and patch 22 on aarch64.
>
> [1] https://lwn.net/Articles/1101647/
> [2] https://patchwork.sourceware.org/project/glibc/list/?series=65564
>
> Adhemerval Zanella (23):
>   Update syscall lists for Linux 7.3
>   Add EFTYPE from Linux 7.2 to bits/errno.h
>   Add OPENAT2_REGULAR from Linux 7.2 to bits/openat2.h
>   Add new constants from Linux 7.2 and 7.3 to bits/fcntl-linux.h
>   Add new AArch64 HWCAP3 definitions from Linux 7.2 to bits/hwcap.h
>   powerpc: Add new HWCAP2 definitions from Linux 7.3
>   Add TCP_AO_* and TCP_IS_MPTCP from Linux 6.7 and 6.10 to netinet/tcp.h
>   Add PTRACE_SET_SYSCALL_INFO from Linux 6.16 to sys/ptrace.h
>   Add FD_INVALID from Linux 6.17 to bits/fcntl-linux.h
>   Update kernel version to 7.3 in header constant tests
>   Use Linux 7.3 in build-many-glibcs.py
>   linux: Add membarrier
>   linux: Add fchroot
>   linux: Add open_tree_attr
>   linux: Add statmount and listmount
>   linux: Add setxattrat, getxattrat, listxattrat, and removexattrat
>   linux: Add file_getattr and file_setattr
>   linux: Add quotactl_fd
>   linux: Add memfd_secret
>   linux: Add ioprio_get and ioprio_set
>   linux: Add kcmp
>   linux: Add listns
>   linux: Add cachestat
>
>  NEWS                                          |  52 ++++
>  bits/xattr_ext.h                              |  21 ++
>  manual/errno.texi                             |   4 +
>  manual/filesys.texi                           |   3 +-
>  manual/llio.texi                              |  27 ++
>  manual/threads.texi                           |  86 +++++++
>  misc/Makefile                                 |   1 +
>  misc/sys/xattr.h                              |   3 +
>  scripts/build-many-glibcs.py                  |   2 +-
>  sysdeps/gnu/netinet/tcp.h                     |   6 +
>  sysdeps/powerpc/bits/hwcap.h                  |   2 +
>  sysdeps/unix/sysv/linux/Makefile              |  17 ++
>  sysdeps/unix/sysv/linux/Versions              |  20 ++
>  .../unix/sysv/linux/aarch64/arch-syscall.h    |   1 +
>  sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h  |   8 +
>  sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  18 ++
>  sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h  |   7 +-
>  sysdeps/unix/sysv/linux/alpha/arch-syscall.h  |   1 +
>  sysdeps/unix/sysv/linux/alpha/bits/errno.h    |   4 +
>  sysdeps/unix/sysv/linux/alpha/libc.abilist    |  18 ++
>  sysdeps/unix/sysv/linux/arc/arch-syscall.h    |   1 +
>  sysdeps/unix/sysv/linux/arc/libc.abilist      |  18 ++
>  sysdeps/unix/sysv/linux/arm/arch-syscall.h    |   1 +
>  sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  18 ++
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  18 ++
>  sysdeps/unix/sysv/linux/arm/sys/ptrace.h      |   6 +-
>  sysdeps/unix/sysv/linux/bits/errno.h          |   4 +
>  sysdeps/unix/sysv/linux/bits/fcntl-linux.h    |   6 +
>  sysdeps/unix/sysv/linux/bits/mman-shared.h    |   5 +
>  sysdeps/unix/sysv/linux/bits/mman_ext.h       |  37 +++
>  sysdeps/unix/sysv/linux/bits/openat2.h        |   6 +
>  sysdeps/unix/sysv/linux/bits/ptrace-shared.h  |   7 +-
>  sysdeps/unix/sysv/linux/bits/unistd_ext.h     |   6 +
>  sysdeps/unix/sysv/linux/bits/xattr_ext.h      |  63 +++++
>  sysdeps/unix/sysv/linux/csky/arch-syscall.h   |   1 +
>  sysdeps/unix/sysv/linux/csky/libc.abilist     |  18 ++
>  sysdeps/unix/sysv/linux/hppa/arch-syscall.h   |   1 +
>  sysdeps/unix/sysv/linux/hppa/bits/errno.h     |   4 +
>  sysdeps/unix/sysv/linux/hppa/libc.abilist     |  18 ++
>  sysdeps/unix/sysv/linux/i386/arch-syscall.h   |   1 +
>  sysdeps/unix/sysv/linux/i386/libc.abilist     |  18 ++
>  .../sysv/linux/loongarch/ilp32/arch-syscall.h |   1 +
>  .../sysv/linux/loongarch/ilp32/libc.abilist   |  18 ++
>  .../sysv/linux/loongarch/lp64/arch-syscall.h  |   1 +
>  .../sysv/linux/loongarch/lp64/libc.abilist    |  18 ++
>  sysdeps/unix/sysv/linux/m68k/arch-syscall.h   |   1 +
>  .../sysv/linux/m68k/coldfire/libc.abilist     |  18 ++
>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  18 ++
>  sysdeps/unix/sysv/linux/memfd_secret.c        |  34 +++
>  .../unix/sysv/linux/microblaze/arch-syscall.h |   1 +
>  .../sysv/linux/microblaze/be/libc.abilist     |  18 ++
>  .../sysv/linux/microblaze/le/libc.abilist     |  18 ++
>  sysdeps/unix/sysv/linux/mips/bits/errno.h     |   4 +
>  .../sysv/linux/mips/mips32/arch-syscall.h     |   1 +
>  .../sysv/linux/mips/mips32/fpu/libc.abilist   |  18 ++
>  .../sysv/linux/mips/mips32/nofpu/libc.abilist |  18 ++
>  .../sysv/linux/mips/mips64/n32/arch-syscall.h |   1 +
>  .../sysv/linux/mips/mips64/n32/libc.abilist   |  18 ++
>  .../sysv/linux/mips/mips64/n64/arch-syscall.h |   1 +
>  .../sysv/linux/mips/mips64/n64/libc.abilist   |  18 ++
>  sysdeps/unix/sysv/linux/or1k/arch-syscall.h   |   1 +
>  sysdeps/unix/sysv/linux/or1k/libc.abilist     |  18 ++
>  .../unix/sysv/linux/powerpc/dl-hwcap-info.c   |   4 +
>  .../linux/powerpc/powerpc32/arch-syscall.h    |   1 +
>  .../linux/powerpc/powerpc32/fpu/libc.abilist  |  18 ++
>  .../powerpc/powerpc32/nofpu/libc.abilist      |  18 ++
>  .../linux/powerpc/powerpc64/arch-syscall.h    |   1 +
>  .../linux/powerpc/powerpc64/be/libc.abilist   |  18 ++
>  .../linux/powerpc/powerpc64/le/libc.abilist   |  18 ++
>  sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h  |   7 +-
>  .../unix/sysv/linux/riscv/rv32/arch-syscall.h |   1 +
>  .../unix/sysv/linux/riscv/rv32/libc.abilist   |  18 ++
>  .../unix/sysv/linux/riscv/rv64/arch-syscall.h |   1 +
>  .../unix/sysv/linux/riscv/rv64/libc.abilist   |  18 ++
>  sysdeps/unix/sysv/linux/s390/arch-syscall.h   |   1 +
>  sysdeps/unix/sysv/linux/s390/libc.abilist     |  18 ++
>  sysdeps/unix/sysv/linux/s390/sys/ptrace.h     |   5 +
>  sysdeps/unix/sysv/linux/sh/arch-syscall.h     |   1 +
>  sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  18 ++
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  18 ++
>  sysdeps/unix/sysv/linux/sparc/bits/errno.h    |   4 +
>  .../sysv/linux/sparc/sparc32/arch-syscall.h   |   1 +
>  .../sysv/linux/sparc/sparc32/libc.abilist     |  18 ++
>  .../sysv/linux/sparc/sparc64/arch-syscall.h   |   1 +
>  .../sysv/linux/sparc/sparc64/libc.abilist     |  18 ++
>  sysdeps/unix/sysv/linux/sparc/sys/ptrace.h    |   6 +-
>  sysdeps/unix/sysv/linux/sys/file_attr.h       |  92 +++++++
>  sysdeps/unix/sysv/linux/sys/ioprio.h          |  85 +++++++
>  sysdeps/unix/sysv/linux/sys/kcmp.h            |  73 ++++++
>  sysdeps/unix/sysv/linux/sys/membarrier.h      |  69 +++++
>  sysdeps/unix/sysv/linux/sys/mount.h           | 120 +++++++++
>  sysdeps/unix/sysv/linux/sys/nsfs.h            |  74 ++++++
>  sysdeps/unix/sysv/linux/sys/ptrace.h          |   6 +-
>  sysdeps/unix/sysv/linux/sys/quota.h           |   4 +
>  sysdeps/unix/sysv/linux/syscall-names.list    |   5 +-
>  sysdeps/unix/sysv/linux/syscalls.list         |  17 ++
>  sysdeps/unix/sysv/linux/tst-cachestat.c       | 156 ++++++++++++
>  sysdeps/unix/sysv/linux/tst-fchroot.c         | 114 +++++++++
>  sysdeps/unix/sysv/linux/tst-file_attr.c       |  89 +++++++
>  sysdeps/unix/sysv/linux/tst-ioprio.c          |  57 +++++
>  sysdeps/unix/sysv/linux/tst-kcmp.c            | 105 ++++++++
>  sysdeps/unix/sysv/linux/tst-listns.c          | 240 ++++++++++++++++++
>  sysdeps/unix/sysv/linux/tst-membarrier.c      | 108 ++++++++
>  sysdeps/unix/sysv/linux/tst-memfd_secret.c    |  67 +++++
>  sysdeps/unix/sysv/linux/tst-mman-consts.py    |   2 +-
>  sysdeps/unix/sysv/linux/tst-mount-consts.py   |  10 +-
>  sysdeps/unix/sysv/linux/tst-mount.c           |  30 +++
>  sysdeps/unix/sysv/linux/tst-openat2-consts.py |   6 +-
>  sysdeps/unix/sysv/linux/tst-openat2.c         |  68 +++++
>  sysdeps/unix/sysv/linux/tst-pidfd-consts.py   |   2 +-
>  sysdeps/unix/sysv/linux/tst-quotactl_fd.c     |  52 ++++
>  sysdeps/unix/sysv/linux/tst-sched-consts.py   |   2 +-
>  sysdeps/unix/sysv/linux/tst-statmount.c       | 151 +++++++++++
>  sysdeps/unix/sysv/linux/tst-xattrat.c         | 154 +++++++++++
>  sysdeps/unix/sysv/linux/x86/sys/ptrace.h      |   6 +-
>  .../unix/sysv/linux/x86_64/64/arch-syscall.h  |   1 +
>  .../unix/sysv/linux/x86_64/64/libc.abilist    |  18 ++
>  .../unix/sysv/linux/x86_64/x32/arch-syscall.h |   1 +
>  .../unix/sysv/linux/x86_64/x32/libc.abilist   |  18 ++
>  119 files changed, 3015 insertions(+), 21 deletions(-)
>  create mode 100644 bits/xattr_ext.h
>  create mode 100644 sysdeps/unix/sysv/linux/bits/xattr_ext.h
>  create mode 100644 sysdeps/unix/sysv/linux/memfd_secret.c
>  create mode 100644 sysdeps/unix/sysv/linux/sys/file_attr.h
>  create mode 100644 sysdeps/unix/sysv/linux/sys/ioprio.h
>  create mode 100644 sysdeps/unix/sysv/linux/sys/kcmp.h
>  create mode 100644 sysdeps/unix/sysv/linux/sys/membarrier.h
>  create mode 100644 sysdeps/unix/sysv/linux/sys/nsfs.h
>  create mode 100644 sysdeps/unix/sysv/linux/tst-cachestat.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-fchroot.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-file_attr.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-ioprio.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-kcmp.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-listns.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-membarrier.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-memfd_secret.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-quotactl_fd.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-statmount.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-xattrat.c
>
> --
> 2.53.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20261103/26e67870/attachment-0001.htm>


More information about the Libc-alpha mailing list