[PATCH v2 7/7] selftests/bpf: add a lifecycle test for the namespace LSM hooks

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 29 16:55:03 UTC 2026


> Track new uts, ipc and net namespaces from a bpf LSM by their namespace
> id and check that:
> 
> - namespace_init already sees the id that NS_GET_ID reports
> 
> - namespace_init, namespace_install and namespace_free fire exactly once
>   for each of them
> 
> The test fails if the namespace_free hook isn't called or if the
> namespace id is allocated after namespace_init.
> 
> Acked-by: Alexei Starovoitov <ast at kernel.org>
> Acked-by: Daniel Borkmann <daniel at iogearbox.net>
> Tested-by: Daniel Borkmann <daniel at iogearbox.net>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261029-work-security-namespace_free-v2-0-65591dbba7b3@kernel.org?part=7




More information about the Linux-security-module-archive mailing list