<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/tools/testing/selftests/namespaces, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/tools/testing/selftests/namespaces?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/tools/testing/selftests/namespaces?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2025-11-11T09:01:32Z</updated>
<entry>
<title>selftests/namespaces: fix nsid tests</title>
<updated>2025-11-11T09:01:32Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-11-10T15:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=6453937581abc05c5e54525c65abb46955a91cd3'/>
<id>urn:sha1:6453937581abc05c5e54525c65abb46955a91cd3</id>
<content type='text'>
Ensure that we always kill and cleanup all processes.

Link: https://patch.msgid.link/20251110-work-namespace-nstree-fixes-v1-17-e8a9264e0fb9@kernel.org
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespaces: test for efault</title>
<updated>2025-11-10T14:53:56Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-11-09T21:11:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=07d7ad46dad48a81ffc796fb7875b1ec141c8b48'/>
<id>urn:sha1:07d7ad46dad48a81ffc796fb7875b1ec141c8b48</id>
<content type='text'>
Ensure that put_user() can fail and that namespace cleanup works
correctly.

Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-8-ae8a4ad5a3b3@kernel.org
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespaces: add active reference count regression test</title>
<updated>2025-11-10T09:20:54Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-11-09T21:11:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=88efd7c6997ee9da3e0274106f72b99fa105f45f'/>
<id>urn:sha1:88efd7c6997ee9da3e0274106f72b99fa105f45f</id>
<content type='text'>
Add a regression test for setns() with pidfd.

Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-7-ae8a4ad5a3b3@kernel.org
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespace: test listns() pagination</title>
<updated>2025-11-03T16:41:25Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-10-29T12:21:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=2cc1c01fe97703d9d694fa49b16fb3aab47b70a9'/>
<id>urn:sha1:2cc1c01fe97703d9d694fa49b16fb3aab47b70a9</id>
<content type='text'>
Minimal test case to reproduce KASAN out-of-bounds in listns pagination.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-72-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespace: add stress test</title>
<updated>2025-11-03T16:41:25Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-10-29T12:21:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=fc85885692a84a6c561351973fea26e4426ae72b'/>
<id>urn:sha1:fc85885692a84a6c561351973fea26e4426ae72b</id>
<content type='text'>
Stress tests for namespace active reference counting.

These tests validate that the active reference counting system can
handle high load scenarios including rapid namespace
creation/destruction, large numbers of concurrent namespaces, and
various edge cases under stress.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-71-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespace: commit_creds() active reference tests</title>
<updated>2025-11-03T16:41:24Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-10-29T12:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=d18cf3f9a4ab67869d468672399de6eac0f8f571'/>
<id>urn:sha1:d18cf3f9a4ab67869d468672399de6eac0f8f571</id>
<content type='text'>
Test credential changes and their impact on namespace active references.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-70-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespace: third threaded active reference count test</title>
<updated>2025-11-03T16:41:24Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-10-29T12:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=80fedf8168ee82c30b343977901b6176cf1e0e76'/>
<id>urn:sha1:80fedf8168ee82c30b343977901b6176cf1e0e76</id>
<content type='text'>
Test that namespaces become inactive after subprocess with multiple
threads exits. Create a subprocess that unshares user and network
namespaces, then creates two threads that share those namespaces. Verify
that after all threads and subprocess exit, the namespaces are no longer
listed by listns() and cannot be opened by open_by_handle_at().

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-69-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespace: second threaded active reference count test</title>
<updated>2025-11-03T16:41:24Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-10-29T12:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ee861032381b6bf9188a84891ae7c31396e5dd2a'/>
<id>urn:sha1:ee861032381b6bf9188a84891ae7c31396e5dd2a</id>
<content type='text'>
Test that a namespace remains active while a thread holds an fd to it.
Even after the thread exits, the namespace should remain active as long
as another thread holds a file descriptor to it.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-68-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespace: first threaded active reference count test</title>
<updated>2025-11-03T16:41:24Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-10-29T12:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=29f083c499821663c2a0863fd2b9c06883c2b19d'/>
<id>urn:sha1:29f083c499821663c2a0863fd2b9c06883c2b19d</id>
<content type='text'>
Test that namespace becomes inactive after thread exits. This verifies
active reference counting works with threads, not just processes.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-67-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/namespaces: twelth inactive namespace resurrection test</title>
<updated>2025-11-03T16:41:24Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2025-10-29T12:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=c89d100f6a10efc1ee90d44125a5500bd5e6ab77'/>
<id>urn:sha1:c89d100f6a10efc1ee90d44125a5500bd5e6ab77</id>
<content type='text'>
Test multi-level namespace resurrection across three user namespace levels.

This test creates a complex namespace hierarchy with three levels of user
namespaces and a network namespace at the deepest level. It verifies that
the resurrection semantics work correctly when SIOCGSKNS is called on a
socket from an inactive namespace tree, and that listns() and
open_by_handle_at() correctly respect visibility rules.

Hierarchy after child processes exit (all with 0 active refcount):

         net_L3A (0)                &lt;- Level 3 network namespace
             |
             +
         userns_L3 (0)              &lt;- Level 3 user namespace
             |
             +
         userns_L2 (0)              &lt;- Level 2 user namespace
             |
             +
         userns_L1 (0)              &lt;- Level 1 user namespace
             |
             x
         init_user_ns

The test verifies:
1. SIOCGSKNS on a socket from inactive net_L3A resurrects the entire chain
2. After resurrection, all namespaces are visible in listns()
3. Resurrected namespaces can be reopened via file handles
4. Closing the netns FD cascades down: the entire ownership chain
   (userns_L3 -&gt; userns_L2 -&gt; userns_L1) becomes inactive again
5. Inactive namespaces disappear from listns() and cannot be reopened
6. Calling SIOCGSKNS again on the same socket resurrects the tree again
7. After second resurrection, namespaces are visible and can be reopened

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-66-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
</feed>
