From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH v2 00/15] linux: Add new syscalls
Date: Mon, 7 Feb 2022 14:44:16 -0300 [thread overview]
Message-ID: <20220207174431.360355-1-adhemerval.zanella@linaro.org> (raw)
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
next reply other threads:[~2022-02-07 17:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 17:44 Adhemerval Zanella [this message]
2022-02-07 17:44 ` [PATCH v2 01/15] linux: Add pidfd_open Adhemerval Zanella
2022-05-16 21:12 ` Carlos O'Donell
2022-06-01 18:02 ` Matheus Castanho
2022-06-01 18:49 ` Adhemerval Zanella
2022-06-01 20:53 ` Matheus Castanho
2022-06-01 22:22 ` Joseph Myers
2022-02-07 17:44 ` [PATCH v2 02/15] linux: Add pidfd_getfd Adhemerval Zanella
2022-05-16 21:12 ` Carlos O'Donell
2022-02-07 17:44 ` [PATCH v2 03/15] linux: Add pidfd_send_signal Adhemerval Zanella
2022-05-16 21:12 ` Carlos O'Donell
2022-02-07 17:44 ` [PATCH v2 04/15] linux: Add P_PIDFD Adhemerval Zanella
2022-05-16 21:12 ` Carlos O'Donell
2022-02-07 17:44 ` [PATCH v2 05/15] linux: Add tst-pidfd.c Adhemerval Zanella
2022-05-16 21:12 ` Carlos O'Donell
2022-02-07 17:44 ` [PATCH v2 06/15] linux: Add process_madvise Adhemerval Zanella
2022-05-31 22:03 ` Carlos O'Donell
2022-06-01 18:04 ` Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 07/15] linux: Add process_mrelease Adhemerval Zanella
2022-05-31 22:12 ` Carlos O'Donell
2022-06-01 18:35 ` Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 08/15] linux: Add fsopen Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 09/15] linux: Add fsmount Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 10/15] linux: Add move_mount Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 11/15] linux: Add fsconfig Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 12/15] linux: Add fspick Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 13/15] linux: Add open_tree Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 14/15] linux: Add tst-mount to check for Linux new mount API Adhemerval Zanella
2022-02-07 17:44 ` [PATCH v2 15/15] linux: Add mount_setattr Adhemerval Zanella
2022-05-16 21:12 ` [PATCH v2 00/15] linux: Add new syscalls Carlos O'Donell
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=20220207174431.360355-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).