| #
76d46ad2 |
| 26-Feb-2026 |
Christian Brauner <brauner@kernel.org> |
selftests/pidfd: add CLONE_AUTOREAP tests
Add tests for the new CLONE_AUTOREAP clone3() flag:
- autoreap_without_pidfd: CLONE_AUTOREAP without CLONE_PIDFD works (fire-and-forget) - autoreap_rejec
selftests/pidfd: add CLONE_AUTOREAP tests
Add tests for the new CLONE_AUTOREAP clone3() flag:
- autoreap_without_pidfd: CLONE_AUTOREAP without CLONE_PIDFD works (fire-and-forget) - autoreap_rejects_exit_signal: CLONE_AUTOREAP with non-zero exit_signal fails - autoreap_rejects_parent: CLONE_AUTOREAP with CLONE_PARENT fails - autoreap_rejects_thread: CLONE_AUTOREAP with CLONE_THREAD fails - autoreap_basic: child exits, pidfd poll works, PIDFD_GET_INFO returns correct exit code, waitpid() returns -ECHILD - autoreap_signaled: child killed by signal, exit info correct via pidfd - autoreap_reparent: autoreap grandchild reparented to subreaper still auto-reaps - autoreap_multithreaded: autoreap process with sub-threads auto-reaps after last thread exits - autoreap_no_inherit: grandchild forked without CLONE_AUTOREAP becomes a regular zombie
Link: https://patch.msgid.link/20260226-work-pidfs-autoreap-v5-4-d148b984a989@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
| #
8c2ab041 |
| 18-Jun-2025 |
Christian Brauner <brauner@kernel.org> |
selftests/pidfd: test setattr support
Verify that ->setattr() on a pidfd doens't work.
Link: https://lore.kernel.org/20250618-work-pidfs-persistent-v2-15-98f3456fd552@kernel.org Reviewed-by: Alexan
selftests/pidfd: test setattr support
Verify that ->setattr() on a pidfd doens't work.
Link: https://lore.kernel.org/20250618-work-pidfs-persistent-v2-15-98f3456fd552@kernel.org Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
| #
49fba372 |
| 18-Jun-2025 |
Christian Brauner <brauner@kernel.org> |
selftests/pidfd: test extended attribute support
Add tests for extended attribute support on pidfds.
Link: https://lore.kernel.org/20250618-work-pidfs-persistent-v2-13-98f3456fd552@kernel.org Revie
selftests/pidfd: test extended attribute support
Add tests for extended attribute support on pidfds.
Link: https://lore.kernel.org/20250618-work-pidfs-persistent-v2-13-98f3456fd552@kernel.org Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
| #
56f235da |
| 05-Mar-2025 |
Christian Brauner <brauner@kernel.org> |
selftests/pidfd: add seventh PIDFD_INFO_EXIT selftest
Add a selftest for PIDFD_INFO_EXIT behavior.
Link: https://lore.kernel.org/r/20250305-work-pidfs-kill_on_last_close-v3-16-c8c3d8361705@kernel.o
selftests/pidfd: add seventh PIDFD_INFO_EXIT selftest
Add a selftest for PIDFD_INFO_EXIT behavior.
Link: https://lore.kernel.org/r/20250305-work-pidfs-kill_on_last_close-v3-16-c8c3d8361705@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
| #
853ab1ff |
| 05-Mar-2025 |
Christian Brauner <brauner@kernel.org> |
selftests/pidfd: add first PIDFD_INFO_EXIT selftest
Add a selftest for PIDFD_INFO_EXIT behavior.
Link: https://lore.kernel.org/r/20250305-work-pidfs-kill_on_last_close-v3-10-c8c3d8361705@kernel.org
selftests/pidfd: add first PIDFD_INFO_EXIT selftest
Add a selftest for PIDFD_INFO_EXIT behavior.
Link: https://lore.kernel.org/r/20250305-work-pidfs-kill_on_last_close-v3-10-c8c3d8361705@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
| #
f63df616 |
| 19-Dec-2024 |
Christian Brauner <brauner@kernel.org> |
selftests: add pidfd bind-mount tests
Link: https://lore.kernel.org/r/20241219-work-pidfs-mount-v1-2-dbc56198b839@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
|
| #
59a42b0e |
| 02-Dec-2024 |
Christian Brauner <brauner@kernel.org> |
selftests/pidfd: add pidfs file handle selftests
Add selftests for pidfs file handles.
Link: https://lore.kernel.org/r/20241202-imstande-einsicht-d78753e1c632@brauner Reviewed-by: Amir Goldstein <a
selftests/pidfd: add pidfs file handle selftests
Add selftests for pidfs file handles.
Link: https://lore.kernel.org/r/20241202-imstande-einsicht-d78753e1c632@brauner Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
| #
2b40c5db |
| 05-May-2020 |
Christian Brauner <christian.brauner@ubuntu.com> |
selftests/pidfd: add pidfd setns tests
This is basically a test-suite for setns() and as of now contains: - test that we can't pass garbage flags - test that we can't attach to the namespaces of ta
selftests/pidfd: add pidfd setns tests
This is basically a test-suite for setns() and as of now contains: - test that we can't pass garbage flags - test that we can't attach to the namespaces of task that has already exited - test that we can incrementally setns into all namespaces of a target task using a pidfd - test that we can setns atomically into all namespaces of a target task - test that we can't cross setns into a user namespace outside of our user namespace hierarchy - test that we can't setns into namespaces owned by user namespaces over which we are not privileged
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/20200505140432.181565-4-christian.brauner@ubuntu.com
show more ...
|
| #
d198b34f |
| 03-Mar-2020 |
Masahiro Yamada <masahiroy@kernel.org> |
.gitignore: add SPDX License Identifier
Add SPDX License Identifier to all .gitignore files.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfou
.gitignore: add SPDX License Identifier
Add SPDX License Identifier to all .gitignore files.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| #
186e28a1 |
| 28-Feb-2020 |
Christophe Leroy <christophe.leroy@c-s.fr> |
selftests: pidfd: Add pidfd_fdinfo_test in .gitignore
The commit identified below added pidfd_fdinfo_test but failed to add it to .gitignore
Fixes: 2def297ec7fb ("pidfd: add tests for NSpid info in
selftests: pidfd: Add pidfd_fdinfo_test in .gitignore
The commit identified below added pidfd_fdinfo_test but failed to add it to .gitignore
Fixes: 2def297ec7fb ("pidfd: add tests for NSpid info in fdinfo") Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/966567c7dbaa26a06730d796354f8a086c0ee288.1582847778.git.christophe.leroy@c-s.fr Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
show more ...
|
| #
873dfd78 |
| 07-Jan-2020 |
Sargun Dhillon <sargun@sargun.me> |
test: Add test for pidfd getfd
The following tests: * Fetch FD, and then compare via kcmp * Make sure getfd can be blocked by blocking ptrace_may_access * Making sure fetching bad FDs fails
test: Add test for pidfd getfd
The following tests: * Fetch FD, and then compare via kcmp * Make sure getfd can be blocked by blocking ptrace_may_access * Making sure fetching bad FDs fails * Make sure trying to set flags to non-zero results in an EINVAL
Signed-off-by: Sargun Dhillon <sargun@sargun.me> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/20200107175927.4558-5-sargun@sargun.me Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
show more ...
|
| #
aed5a8df |
| 26-Jul-2019 |
Suren Baghdasaryan <surenb@google.com> |
tests: add pidfd poll tests
This adds testing for polling on pidfd of a process being killed. Test runs 10000 iterations by default to stress test pidfd polling functionality. It accepts an optional
tests: add pidfd poll tests
This adds testing for polling on pidfd of a process being killed. Test runs 10000 iterations by default to stress test pidfd polling functionality. It accepts an optional command-line parameter to override the number or iterations to run. Specifically, it tests for: - pidfd_open on a child process succeeds - pidfd_send_signal on a child process succeeds - polling on pidfd succeeds and returns exactly one event - returned event is POLLIN - event is received within 3 secs of the process being killed
10000 iterations was chosen because of the race condition being tested which is not consistently reproducible but usually is revealed after less than 2000 iterations. Reveals race fixed by commit b191d6491be6 ("pidfd: fix a poll race when setting exit_state")
Signed-off-by: Suren Baghdasaryan <surenb@google.com> Link: https://lore.kernel.org/r/20190726162226.252750-2-surenb@google.com Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
show more ...
|
| #
e63f3085 |
| 28-Jul-2019 |
Christian Brauner <christian.brauner@ubuntu.com> |
pidfd: add pidfd_wait tests
Add tests for pidfd_wait() and CLONE_WAIT_PID: - test that waitid(P_PIDFD) fails on /proc/<pid> - test that waitid(P_PIDFD) fails on /dev/null - test that waitid(P_PIDFD)
pidfd: add pidfd_wait tests
Add tests for pidfd_wait() and CLONE_WAIT_PID: - test that waitid(P_PIDFD) fails on /proc/<pid> - test that waitid(P_PIDFD) fails on /dev/null - test that waitid(P_PIDFD) can wait on a pidfd - test that waitid(P_PIDFD) can wait on a pidfd and return siginfo_t - test that waitid(P_PIDFD) works with WEXITED - test that waitid(P_PIDFD) works with WSTOPPED - test that waitid(P_PIDFD) works with WUNTRACED - test that waitid(P_PIDFD) works with WCONTINUED - test that waitid(P_PIDFD) works with WNOWAIT - test that waitid(P_PIDFD)works with WNOHANG
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Joel Fernandes (Google) <joel@joelfernandes.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: David Howells <dhowells@redhat.com> Cc: Jann Horn <jannh@google.com> Cc: Andy Lutomirsky <luto@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Aleksa Sarai <cyphar@cyphar.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Link: https://lore.kernel.org/r/20190727222229.6516-3-christian@brauner.io
show more ...
|
| #
172bb24a |
| 23-Mar-2019 |
Christian Brauner <christian@brauner.io> |
tests: add pidfd_open() tests
This adds testing for the new pidfd_open() syscalls. Specifically, we test: - that no invalid flags can be passed to pidfd_open() - that no invalid pid can be passed to
tests: add pidfd_open() tests
This adds testing for the new pidfd_open() syscalls. Specifically, we test: - that no invalid flags can be passed to pidfd_open() - that no invalid pid can be passed to pidfd_open() - that a pidfd can be retrieved with pidfd_open() - that the retrieved pidfd references the correct pid
Signed-off-by: Christian Brauner <christian@brauner.io> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Kees Cook <keescook@chromium.org> Cc: Joel Fernandes (Google) <joel@joelfernandes.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jann Horn <jannh@google.com> Cc: David Howells <dhowells@redhat.com> Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> Cc: Andy Lutomirsky <luto@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Aleksa Sarai <cyphar@cyphar.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: linux-api@vger.kernel.org
show more ...
|
| #
4d0b5f4d |
| 12-May-2019 |
Kelsey Skunberg <skunberg.kelsey@gmail.com> |
selftests: pidfd: Create .gitignore to include pidfd_test
Create ../selftests/pidfd/.gitignore which holds the following file name created after compiling:
- pidfd_test
Signed-off-by: Kelsey Skun
selftests: pidfd: Create .gitignore to include pidfd_test
Create ../selftests/pidfd/.gitignore which holds the following file name created after compiling:
- pidfd_test
Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|