[PATCH v2 00/15] linux: Add new syscalls
Adhemerval Zanella
adhemerval.zanella@linaro.org
Mon Feb 7 17:44:16 GMT 2022
This patchset adds two sets of Linux syscalls: the pidfd and the new
mount API.
The pidfd support was initially added with clone3 when used with
CLONE_PIDFD to return a file file descriptor referring to the child
process. This set adds the missing pidfd_open (added on Linux 5.3),
pidfd_getfd (Linux 5.6), and pidfd_send_signal (Linux 5.1), along
with P_PIDFD flag use along waitid. These newer syscalls allows
race free process signaling by avoiding the PID reuse.
Along with pidfd, two new syscalls are also added: process_madvise
and process_mrelease. Both uses the pidfd to add a way to interact
with target memory, former acts as posix_madvise for target process
and later allows the caller to handle target memory cleanup at
process exit.
The second set is the new mount API added Linux 5.2, which adds
six syscalls: fsopen, fsmount, move_mount, fsconfig, fspick, and
open_tree. It also adds mount_setattr which was added on Linux 5.12.
This is complete redesign of the mount API to allow more flexibility
with mount points, specially when used along namespaces.
Adhemerval Zanella (15):
linux: Add pidfd_open
linux: Add pidfd_getfd
linux: Add pidfd_send_signal
linux: Add P_PIDFD
linux: Add tst-pidfd.c
linux: Add process_madvise
linux: Add process_mrelease
linux: Add fsopen
linux: Add fsmount
linux: Add move_mount
linux: Add fsconfig
linux: Add fspick
linux: Add open_tree
linux: Add tst-mount to check for Linux new mount API
linux: Add mount_setattr
NEWS | 14 +-
bits/mman_ext.h | 21 +++
misc/sys/mman.h | 3 +
posix/Makefile | 2 +-
posix/sys/wait.h | 7 +-
sysdeps/generic/libc.abilist | 1 +
sysdeps/mach/hurd/bits/types/idtype_t.h | 12 ++
sysdeps/unix/sysv/linux/Makefile | 27 ++-
sysdeps/unix/sysv/linux/Versions | 14 ++
sysdeps/unix/sysv/linux/aarch64/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/alpha/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/arc/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/arm/be/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/arm/le/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/bits/mman_ext.h | 35 ++++
sysdeps/unix/sysv/linux/bits/types/idtype_t.h | 14 ++
sysdeps/unix/sysv/linux/csky/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/hppa/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/i386/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/ia64/libc.abilist | 12 ++
.../sysv/linux/m68k/coldfire/libc.abilist | 12 ++
.../unix/sysv/linux/m68k/m680x0/libc.abilist | 12 ++
.../sysv/linux/microblaze/be/libc.abilist | 12 ++
.../sysv/linux/microblaze/le/libc.abilist | 12 ++
.../sysv/linux/mips/mips32/fpu/libc.abilist | 12 ++
.../sysv/linux/mips/mips32/nofpu/libc.abilist | 12 ++
.../sysv/linux/mips/mips64/n32/libc.abilist | 12 ++
.../sysv/linux/mips/mips64/n64/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/nios2/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/or1k/libc.abilist | 12 ++
.../linux/powerpc/powerpc32/fpu/libc.abilist | 12 ++
.../powerpc/powerpc32/nofpu/libc.abilist | 12 ++
.../linux/powerpc/powerpc64/be/libc.abilist | 12 ++
.../linux/powerpc/powerpc64/le/libc.abilist | 12 ++
.../unix/sysv/linux/riscv/rv32/libc.abilist | 12 ++
.../unix/sysv/linux/riscv/rv64/libc.abilist | 12 ++
.../unix/sysv/linux/s390/s390-32/libc.abilist | 12 ++
.../unix/sysv/linux/s390/s390-64/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/sh/be/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/sh/le/libc.abilist | 12 ++
.../sysv/linux/sparc/sparc32/libc.abilist | 12 ++
.../sysv/linux/sparc/sparc64/libc.abilist | 12 ++
sysdeps/unix/sysv/linux/sys/mount.h | 115 ++++++++++++
sysdeps/unix/sysv/linux/sys/pidfd.h | 49 +++++
sysdeps/unix/sysv/linux/syscalls.list | 12 ++
sysdeps/unix/sysv/linux/tst-mount-consts.py | 61 +++++++
sysdeps/unix/sysv/linux/tst-mount.c | 119 ++++++++++++
sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 49 +++++
sysdeps/unix/sysv/linux/tst-pidfd.c | 170 ++++++++++++++++++
sysdeps/unix/sysv/linux/tst-process_madvise.c | 107 +++++++++++
.../unix/sysv/linux/tst-process_mrelease.c | 72 ++++++++
.../unix/sysv/linux/x86_64/64/libc.abilist | 12 ++
.../unix/sysv/linux/x86_64/x32/libc.abilist | 12 ++
53 files changed, 1291 insertions(+), 9 deletions(-)
create mode 100644 bits/mman_ext.h
create mode 100644 sysdeps/mach/hurd/bits/types/idtype_t.h
create mode 100644 sysdeps/unix/sysv/linux/bits/mman_ext.h
create mode 100644 sysdeps/unix/sysv/linux/bits/types/idtype_t.h
create mode 100644 sysdeps/unix/sysv/linux/sys/pidfd.h
create mode 100755 sysdeps/unix/sysv/linux/tst-mount-consts.py
create mode 100644 sysdeps/unix/sysv/linux/tst-mount.c
create mode 100644 sysdeps/unix/sysv/linux/tst-pidfd-consts.py
create mode 100644 sysdeps/unix/sysv/linux/tst-pidfd.c
create mode 100644 sysdeps/unix/sysv/linux/tst-process_madvise.c
create mode 100644 sysdeps/unix/sysv/linux/tst-process_mrelease.c
--
2.32.0
More information about the Libc-alpha
mailing list