linux/security/landlock
Mickaël Salaün 0de33ca344
landlock: Fix filesystem denial blocker reporting
Filesystem topology denials are rendered with an empty blockers value
because their blocker is identified by the request type instead of an
access mask.

Introduce the private struct landlock_blockers to carry the request type
and final missing access mask to filesystem and network denial
tracepoints. Copy both members into named trace-record fields, then use
the type to print change_topology for topology denials while preserving
symbolic access masks for ordinary denials.

The request type lets typed BPF consumers distinguish topology denials
from access denials. Keeping the native access mask in a pointer-reached
field also lets CO-RE adjust existing programs' load width if
access_mask_t grows.

Cc: Günther Noack <gnoack@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Fixes: 01ce260f5c ("landlock: Add landlock_deny_access_fs and landlock_deny_access_net")
Link: https://patch.msgid.link/20260918185036.608651-3-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-09-20 11:08:01 +02:00
..
errata landlock: Require LANDLOCK_ACCESS_FS_MAKE_REG for whiteout creation 2026-08-15 09:14:43 +02:00
.kunitconfig landlock: Test trace path output boundaries 2026-09-08 11:49:39 +02:00
access.h landlock: Work around gcc-16 -Wuninitialized warning 2026-09-20 11:07:58 +02:00
audit.c landlock: Consolidate access-right and scope names in a shared header 2026-08-17 10:17:13 +02:00
audit.h landlock: Decouple the per-denial logging decision from CONFIG_AUDIT 2026-08-17 10:17:12 +02:00
common.h landlock: Add support for KUnit tests 2024-02-27 11:21:45 +01:00
cred.c landlock: Split denial logging from audit into common framework 2026-08-17 10:17:11 +02:00
cred.h landlock: Split denial logging from audit into common framework 2026-08-17 10:17:11 +02:00
domain.c landlock: Clean up ruleset validation checks 2026-09-08 11:49:32 +02:00
domain.h landlock: Add tracepoints for rule checking 2026-08-17 10:17:15 +02:00
errata.h landlock: Prepare to add second errata 2025-03-21 12:12:21 +01:00
fs.c landlock: Fix use-after-free of the source's parent directory 2026-09-07 12:01:47 +02:00
fs.h landlock: Add landlock_add_rule_fs and landlock_add_rule_net tracepoints 2026-08-17 10:17:14 +02:00
id.c landlock: Improve kernel-doc "Return:" section consistency 2026-04-07 18:51:04 +02:00
id.h landlock: Split denial logging from audit into common framework 2026-08-17 10:17:11 +02:00
Kconfig landlock: Add create_ruleset and free_ruleset tracepoints 2026-08-17 10:17:13 +02:00
limits.h landlock: Add LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS 2026-08-15 09:14:46 +02:00
log.c landlock: Add landlock_deny_access_fs and landlock_deny_access_net 2026-08-17 10:17:16 +02:00
log.h landlock: Fix filesystem denial blocker reporting 2026-09-20 11:08:01 +02:00
Makefile landlock: Add create_ruleset and free_ruleset tracepoints 2026-08-17 10:17:13 +02:00
net.c landlock: Add tracepoints for rule checking 2026-08-17 10:17:15 +02:00
net.h landlock: Add API support and docs for the quiet flags 2026-06-14 20:17:19 +02:00
object.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
object.h landlock: Format with clang-format 2022-05-09 12:31:10 +02:00
ruleset.c landlock: Clean up ruleset validation checks 2026-09-08 11:49:32 +02:00
ruleset.h landlock: Add landlock_add_rule_fs and landlock_add_rule_net tracepoints 2026-08-17 10:17:14 +02:00
setup.c lsm: replace the name field with a pointer to the lsm_id struct 2025-10-22 19:24:18 -04:00
setup.h landlock: Add the errata interface 2025-03-21 12:12:19 +01:00
syscalls.c landlock: Add landlock_enforce_domain tracepoint 2026-08-17 10:17:15 +02:00
task.c landlock: Add tracepoints for ptrace and scope denials 2026-08-17 10:17:16 +02:00
task.h landlock: Rename "ptrace" files to "task" 2024-03-08 18:22:16 +01:00
trace.c landlock: Fix filesystem denial blocker reporting 2026-09-20 11:08:01 +02:00
trace.h landlock: Add landlock_deny_access_fs and landlock_deny_access_net 2026-08-17 10:17:16 +02:00
tsync.c landlock: Add landlock_enforce_domain tracepoint 2026-08-17 10:17:15 +02:00
tsync.h landlock: Add LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS 2026-08-15 09:14:46 +02:00