From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 00/15] linux: Add new syscalls
Date: Thu, 3 Feb 2022 14:46:19 -0300 [thread overview]
Message-ID: <20220203174634.3474775-1-adhemerval.zanella@linaro.org> (raw)
This patchset adds two sets of new Linux syscalls: the pidfd extra
syscalls and the new mount API.
The pifd was initially added clone3 when issue 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 definition to
be used along waitid. These newer syscalls now allows a 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 pifd to add a way to interact
with target memory, former being a remove posix_madvise call and later
allowing the caller to handle target the memory cleanup.
The second set is the new mount API added Linux 5.2, which adds new
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 | 55 ++++++
sysdeps/unix/sysv/linux/tst-mount.c | 119 ++++++++++++
sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 42 +++++
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, 1278 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
next reply other threads:[~2022-02-03 17:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 17:46 Adhemerval Zanella [this message]
2022-02-03 17:46 ` [PATCH 01/15] linux: Add pidfd_open Adhemerval Zanella
2022-02-04 19:46 ` Joseph Myers
2022-02-04 19:59 ` Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 02/15] linux: Add pidfd_getfd Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 03/15] linux: Add pidfd_send_signal Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 04/15] linux: Add P_PIDFD Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 05/15] linux: Add tst-pidfd.c Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 06/15] linux: Add process_madvise Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 07/15] linux: Add process_mrelease Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 08/15] linux: Add fsopen Adhemerval Zanella
2022-02-04 19:48 ` Joseph Myers
2022-02-03 17:46 ` [PATCH 09/15] linux: Add fsmount Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 10/15] linux: Add move_mount Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 11/15] linux: Add fsconfig Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 12/15] linux: Add fspick Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 13/15] linux: Add open_tree Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 14/15] linux: Add tst-mount to check for Linux new mount API Adhemerval Zanella
2022-02-03 17:46 ` [PATCH 15/15] linux: Add mount_setattr Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220203174634.3474775-1-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).