[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190727222229.6516-1-christian@brauner.io>
Date: Sun, 28 Jul 2019 00:22:28 +0200
From: Christian Brauner <christian@...uner.io>
To: linux-kernel@...r.kernel.org, oleg@...hat.com,
torvalds@...ux-foundation.org
Cc: arnd@...db.de, ebiederm@...ssion.com, keescook@...omium.org,
joel@...lfernandes.org, tglx@...utronix.de, tj@...nel.org,
dhowells@...hat.com, jannh@...gle.com, luto@...nel.org,
akpm@...ux-foundation.org, cyphar@...har.com,
viro@...iv.linux.org.uk, kernel-team@...roid.com,
Christian Brauner <christian@...uner.io>
Subject: [PATCH v3 0/2] pidfd: waiting on processes through pidfds
Hey everyone,
/* v3 */
This adds the ability to wait on processes using pidfds. This is one of
the few missing pieces to make it possible to manage processes using
only pidfds.
Now major changes have occured since v2. The only thing that was changed
has been to move the translation of a pidfd into a struct pid to a
dedicated helper that also does a get_pid() on it to keep the exit code
identical for all switch cases.
I've also added a test to verify that we correctly fail when an invalid
file descriptor is passed.
The core patch for waitid is pleasantly small. The largest change is
caused by adding proper tests for waitid(P_PIDFD).
/* v2 */
Link: https://lore.kernel.org/lkml/20190727085201.11743-1-christian@brauner.io
/* v1 */
Link: https://lore.kernel.org/lkml/20190726093934.13557-1-christian@brauner.io
/* v0 */
Link: https://lore.kernel.org/lkml/20190724144651.28272-1-christian@brauner.io
Christian
Christian Brauner (2):
pidfd: add P_PIDFD to waitid()
pidfd: add pidfd_wait tests
include/linux/pid.h | 4 +
include/uapi/linux/wait.h | 1 +
kernel/exit.c | 33 ++-
kernel/fork.c | 8 +
kernel/signal.c | 7 +-
tools/testing/selftests/pidfd/pidfd.h | 25 ++
tools/testing/selftests/pidfd/pidfd_test.c | 14 --
tools/testing/selftests/pidfd/pidfd_wait.c | 258 +++++++++++++++++++++
8 files changed, 331 insertions(+), 19 deletions(-)
create mode 100644 tools/testing/selftests/pidfd/pidfd_wait.c
--
2.22.0
Powered by blists - more mailing lists