From: Christian Brauner <christian.brauner@ubuntu.com>
To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org
Subject: [GIT PULL v1] core process updates for v5.4
Date: Tue, 10 Sep 2019 18:00:51 +0200 [thread overview]
Message-ID: <20190910160051.3795-1-christian.brauner@ubuntu.com> (raw)
In-Reply-To: <20190904133418.23573-1-christian.brauner@ubuntu.com>
Hi Linus,
This is a resend of the pull request for v5.4 with the clone3 extension for
choosing a specific pid at process creation time _dropped_: After an
in-person discussion between multiple parties at LPC/KSummit use-cases were
presented that require restoring nested pid namespaces. This means clone3
would need to create a process with specific pids in multiple pid
namespaces not just a single one. For this reason, it seems wise to delay
this feature one more cycle to get the semantics for this right. Sorry for
the churn! The rest is _unchanged_.
This pull request includes the current process group and pidfd extensions
for the waitid() syscall and various tests.
All changes are centered around process management not just the pidfd api.
For this reason the tag name is core-process-v5.4. If you have objections
and would rather see this split in separate PRs, please tell me.
The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:
Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/core-process-v5.4
for you to fetch changes up to 821cc7b0b205c0df64cce59aacc330af251fa8f7:
waitid: Add support for waiting for the current process group (2019-09-10 17:05:46 +0200)
/* Summary */
This tag contains two features and various tests.
First, it adds support for waiting on process through pidfds by adding the
P_PIDFD type to the waitid() syscall. This completes the basic
functionality of the pidfd api (cf. [1]).
In the meantime we also have a new adition to the userspace projects that
make use of the pidfd api. The qt project was nice enough to send a mail
pointing out that they have a pr up to switch to the pidfd api (cf. [2]).
Second, this tag contains an extension to the waitid() syscall to make it
possible to wait on the current process group in a race free manner (even
though the actual problem is very unlikely) by specifing 0 together with
the P_PGID type. This extension traces back to a discussion on the glibc
development mailing list.
There are also a range of tests for the features above. Additionally, the
test-suite which detected the pidfd-polling race we fixed in [3] is
included in this tag.
/* Testing */
All patches are based on v5.3-rc1 and have been sitting in linux-next since
then or at least before v5.3-rc3. None of them have caused failures or
warnings and they are passing the tests accompanying them.
/* Conflicts */
At the time of creating this PR no merge conflicts were observed in
linux-next.
Please consider pulling these changes from the signed core-process-v5.4 tag.
Thanks!
Christian
/* References */
[1]: https://lwn.net/Articles/794707/
[2]: https://codereview.qt-project.org/c/qt/qtbase/+/108456
[3]: commit b191d6491be6 ("pidfd: fix a poll race when setting exit_state")
----------------------------------------------------------------
core-process-v5.4
----------------------------------------------------------------
Christian Brauner (2):
pidfd: add P_PIDFD to waitid()
pidfd: add pidfd_wait tests
Eric W. Biederman (1):
waitid: Add support for waiting for the current process group
Suren Baghdasaryan (2):
tests: move common definitions and functions into pidfd.h
tests: add pidfd poll tests
include/linux/pid.h | 4 +
include/uapi/linux/wait.h | 1 +
kernel/exit.c | 38 +++-
kernel/fork.c | 8 +
kernel/signal.c | 7 +-
tools/testing/selftests/pidfd/.gitignore | 2 +
tools/testing/selftests/pidfd/Makefile | 2 +-
tools/testing/selftests/pidfd/pidfd.h | 30 +++
tools/testing/selftests/pidfd/pidfd_open_test.c | 5 -
tools/testing/selftests/pidfd/pidfd_poll_test.c | 117 ++++++++++
tools/testing/selftests/pidfd/pidfd_test.c | 14 --
tools/testing/selftests/pidfd/pidfd_wait.c | 271 ++++++++++++++++++++++++
12 files changed, 473 insertions(+), 26 deletions(-)
create mode 100644 tools/testing/selftests/pidfd/pidfd_poll_test.c
create mode 100644 tools/testing/selftests/pidfd/pidfd_wait.c
next prev parent reply other threads:[~2019-09-10 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 13:34 [GIT PULL] " Christian Brauner
2019-09-10 16:00 ` Christian Brauner [this message]
2019-09-16 21:35 ` [GIT PULL v1] " pr-tracker-bot
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=20190910160051.3795-1-christian.brauner@ubuntu.com \
--to=christian.brauner@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®