[PATCH 2/4] landlock: Add capability objects to denial tracing

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 17 10:27:58 UTC 2026


> The capability denial tracepoint identifies the capability number but
> not the credentials or user namespace against which it was checked.
> Typed BPF consumers therefore cannot reconstruct the authoritative hook
> context, especially when a check targets a user namespace other than the
> caller's current namespace.
> 
> Carry the exact cred and user_ns arguments from capable() through the
> synchronous Landlock logging request and add them to the tracepoint's
> BTF prototype.  Keep them out of TP_STRUCT__entry and TP_printk so the
> raw ring-buffer layout and textual format remain unchanged.  They
> provide context only and do not participate in Landlock's verdict.
> 
> Do not carry the capability options.  CAP_OPT_NOAUDIT already suppresses
> the complete denial record, and the remaining option bits do not explain
> the checked security relationship.
> 
> Cc: Günther Noack <gnoack at google.com>
> Fixes: 97c8386f1d74 ("landlock: Enforce capability restrictions")
> Signed-off-by: Mickaël Salaün <mic at digikod.net>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117102110.2524197-1-mic@digikod.net?part=2




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