diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-07-26 18:13:47 +0200 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2026-08-31 16:14:10 -0400 |
| commit | f675d2e9556963133b71df68739b771bf51c3a67 (patch) | |
| tree | 6e428ec092de1984f8916d7d84bff77d940ec0a4 /scripts/Makefile.thinlto | |
| parent | 4f238e6e1c2cc985ca6885549e05de8fc37ad4fe (diff) | |
| download | linux-next-f675d2e9556963133b71df68739b771bf51c3a67.tar.gz linux-next-f675d2e9556963133b71df68739b771bf51c3a67.zip | |
lsm: add LSM blob and hooks for namespaces
All namespace types now share the same ns_common infrastructure. Extend
this to include a security blob so LSMs can start managing namespaces
uniformly without having to add one-off hooks or security fields to
every individual namespace type.
Add a ns_security pointer to ns_common and the corresponding lbs_ns blob
size to lsm_blob_sizes. Allocation and freeing hooks are called from the
common __ns_common_init() and __ns_common_free() paths so every
namespace type gets covered in one go. All information about the
namespace type and the appropriate casting helpers to get at the
containing namespace are available via ns_common making it
straightforward for LSMs to differentiate when they need to.
A namespace_install hook is called from validate_ns() during setns(2)
giving LSMs a chance to enforce policy on namespace transitions. The
LSM check runs before ns->ops->install() so the security module can deny
the operation before any type-specific installation effects.
Individual namespace types can still have their own specialized security
hooks when needed. This is just the common baseline that makes it easy
to track and manage namespaces from the security side without requiring
every namespace type to reinvent the wheel.
Cc: Günther Noack <gnoack@google.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Serge E. Hallyn <serge@hallyn.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20260216-work-security-namespace-v1-1-075c28758e1f@kernel.org
Signed-off-by: Mickaël Salaün <mic@digikod.net>
[PM: subject tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
