<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/pidfd, branch v5.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-06-16T22:48:54Z</updated>
<entry>
<title>tests: test for setns() EINVAL regression</title>
<updated>2020-06-16T22:48:54Z</updated>
<author>
<name>Christian Brauner</name>
<email>christian.brauner@ubuntu.com</email>
</author>
<published>2020-06-16T22:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86f56395feb2b106b125c47e72192e37da5dd088'/>
<id>urn:sha1:86f56395feb2b106b125c47e72192e37da5dd088</id>
<content type='text'>
Verify that setns() reports EINVAL when an fd is passed that refers to an
open file but the file is not a file descriptor useable to interact with
namespaces.

Cc: Jan Stancek &lt;jstancek@redhat.com&gt;
Cc: Cyril Hrubis &lt;chrubis@suse.cz&gt;
Link: https://lore.kernel.org/lkml/20200615085836.GR12456@shao2-debian
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>selftests/pidfd: add pidfd setns tests</title>
<updated>2020-05-13T09:41:22Z</updated>
<author>
<name>Christian Brauner</name>
<email>christian.brauner@ubuntu.com</email>
</author>
<published>2020-05-05T14:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b40c5db73e239531ea54991087f4edc07fbb08e'/>
<id>urn:sha1:2b40c5db73e239531ea54991087f4edc07fbb08e</id>
<content type='text'>
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 &lt;christian.brauner@ubuntu.com&gt;
Link: https://lore.kernel.org/r/20200505140432.181565-4-christian.brauner@ubuntu.com
</content>
</entry>
<entry>
<title>Merge tag 'threads-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux</title>
<updated>2020-04-04T17:08:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-04-04T17:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e396a5d171d61aa00d49389d92f8afb21568635'/>
<id>urn:sha1:1e396a5d171d61aa00d49389d92f8afb21568635</id>
<content type='text'>
Pull thread updates from Christian Brauner:
 "The main change for this cycle was the extension for clone3() to
  support spawning processes directly into cgroups via CLONE_INTO_CGROUP
  (commit ef2c41cf38a7: "clone3: allow spawning processes
  into cgroups").

  But since I had to touch kernel/cgroup/ quite a bit I had Tejun route
  that through his tree this time around to make it easier for him to
  handle other changes.

  So here is just the unexciting leftovers: a regression test for the
  ENOMEM regression we fixed in commit b26ebfe12f34 ("pid: Fix error
  return value in some cases") verifying that we report ENOMEM when
  trying to create a new process in a pid namespace whose init
  process/subreaper has already exited"

* tag 'threads-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
  selftests: add pid namespace ENOMEM regression test
</content>
</entry>
<entry>
<title>selftests: add pid namespace ENOMEM regression test</title>
<updated>2020-03-25T12:50:34Z</updated>
<author>
<name>Christian Brauner</name>
<email>christian.brauner@ubuntu.com</email>
</author>
<published>2020-03-08T16:26:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6952a4f646446fde9e190b62c5e45f84c6cf91aa'/>
<id>urn:sha1:6952a4f646446fde9e190b62c5e45f84c6cf91aa</id>
<content type='text'>
We recently regressed (cf. [1] and its corresponding fix in [2]) returning
ENOMEM when trying to create a process in a pid namespace whose init
process/child subreaper has already died. This has caused confusion at
least once before that (cf. [3]). Let's add a simple regression test to
catch this in the future.

[1]: 49cb2fc42ce4 ("fork: extend clone3() to support setting a PID")
[2]: b26ebfe12f34 ("pid: Fix error return value in some cases")
[3]: 35f71bc0a09a ("fork: report pid reservation failure properly")
Cc: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Adrian Reber &lt;areber@redhat.com&gt;
Cc: Dmitry Safonov &lt;0x7f454c46@gmail.com&gt;
Cc: Andrei Vagin &lt;avagin@gmail.com&gt;
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>.gitignore: add SPDX License Identifier</title>
<updated>2020-03-25T10:50:48Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-03-03T13:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d198b34f3855eee2571dda03eea75a09c7c31480'/>
<id>urn:sha1:d198b34f3855eee2571dda03eea75a09c7c31480</id>
<content type='text'>
Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: pidfd: Add pidfd_fdinfo_test in .gitignore</title>
<updated>2020-02-28T12:35:05Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@c-s.fr</email>
</author>
<published>2020-02-28T00:00:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=186e28a18aeb0fec99cc586fda337e6b23190791'/>
<id>urn:sha1:186e28a18aeb0fec99cc586fda337e6b23190791</id>
<content type='text'>
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 &lt;christophe.leroy@c-s.fr&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/966567c7dbaa26a06730d796354f8a086c0ee288.1582847778.git.christophe.leroy@c-s.fr
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>test: Add test for pidfd getfd</title>
<updated>2020-01-13T20:49:54Z</updated>
<author>
<name>Sargun Dhillon</name>
<email>sargun@sargun.me</email>
</author>
<published>2020-01-07T17:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=873dfd7881d1d8840bf69c8c164f5323db7417fa'/>
<id>urn:sha1:873dfd7881d1d8840bf69c8c164f5323db7417fa</id>
<content type='text'>
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 &lt;sargun@sargun.me&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Link: https://lore.kernel.org/r/20200107175927.4558-5-sargun@sargun.me
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>test: verify fdinfo for pidfd of reaped process</title>
<updated>2019-10-17T13:36:54Z</updated>
<author>
<name>Christian Brauner</name>
<email>christian.brauner@ubuntu.com</email>
</author>
<published>2019-10-17T10:18:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67fc700016b75d6306b65d68edd2e5d76b2b1160'/>
<id>urn:sha1:67fc700016b75d6306b65d68edd2e5d76b2b1160</id>
<content type='text'>
Test that the fdinfo field of a pidfd referring to a dead process
correctly shows Pid: -1 and NSpid: -1.

Cc: Christian Kellner &lt;christian@kellner.me&gt;
Cc: linux-kselftest@vger.kernel.org
Reviewed-by: Christian Kellner &lt;christian@kellner.me&gt;
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Link: https://lore.kernel.org/r/20191017101832.5985-2-christian.brauner@ubuntu.com
</content>
</entry>
<entry>
<title>pidfd: add tests for NSpid info in fdinfo</title>
<updated>2019-10-15T10:17:11Z</updated>
<author>
<name>Christian Kellner</name>
<email>christian@kellner.me</email>
</author>
<published>2019-10-14T16:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2def297ec7fbf68cedc48f69e1f600fef13f2e96'/>
<id>urn:sha1:2def297ec7fbf68cedc48f69e1f600fef13f2e96</id>
<content type='text'>
Add a test that checks that if pid namespaces are configured the fdinfo
file of a pidfd contains an NSpid: entry containing the process id in
the current and additionally all nested namespaces. In the case that
a pidfd is from a pid namespace not in the same namespace hierarchy as
the process accessing the fdinfo file, ensure the 'NSpid' shows 0 for
that pidfd, analogous to the 'Pid' entry.

Signed-off-by: Christian Kellner &lt;christian@kellner.me&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Link: https://lore.kernel.org/r/20191014162034.2185-2-ckellner@redhat.com
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>selftests: pidfd: Fix undefined reference to pthread_create()</title>
<updated>2019-09-30T20:32:55Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2019-09-24T19:52:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3969e76909d3aa06715997896184ee684f68d164'/>
<id>urn:sha1:3969e76909d3aa06715997896184ee684f68d164</id>
<content type='text'>
Fix build failure:

undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status

Fix CFLAGS to include pthread correctly.

Fixes: 740378dc7834 ("pidfd: add polling selftests")
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Reviewed-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20190924195237.30519-1-skhan@linuxfoundation.org
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
</content>
</entry>
</feed>
