summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2026-10-14 10:27:08 +0200
committerMickaël Salaün <mic@digikod.net>2026-10-20 16:47:19 +0200
commit68ba67106a3c7529672b7f2189916442a1ee09b5 (patch)
tree4a746336d27a3405f7bc640de1e8820abfc5c661 /include/trace
parent9c2a44d83efa203e6d2f3316effd0880f4939a49 (diff)
landlock: Wrap per-layer access masks in struct layer_config
The domain layer FAM stores struct access_masks values directly, while a ruleset stores the equivalent single mutable value. Per-category permissions need additional per-layer data beyond the handled-access bitfields. Introduce struct layer_config as the common value type. Keeping the handled bitfields in its .handled member leaves struct access_masks as a lightweight parameter type for functions that only need those bitfields, while the complete layer can be snapshotted with one assignment. At this point struct layer_config only wraps the four-byte access_masks, so it does not grow the per-domain allocation: the maximum 16-entry FAM remains 64 bytes. No functional change. Cc: Günther Noack <gnoack@google.com> Reviewed-by: Günther Noack <gnoack@google.com> Reviewed-by: Tingmao Wang <m@maowtm.org> Link: https://patch.msgid.link/20261014082718.1435842-3-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/landlock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/trace/events/landlock.h b/include/trace/events/landlock.h
index 3a43638c9bc2..215d08c1e03d 100644
--- a/include/trace/events/landlock.h
+++ b/include/trace/events/landlock.h
@@ -353,9 +353,9 @@ TRACE_EVENT(landlock_create_ruleset,
TP_fast_assign(
__entry->ruleset_id = ruleset->id;
__entry->ruleset_version = ruleset->version;
- __entry->handled_fs = ruleset->handled_masks.fs;
- __entry->handled_net = ruleset->handled_masks.net;
- __entry->scoped = ruleset->handled_masks.scope;
+ __entry->handled_fs = ruleset->layer.handled.fs;
+ __entry->handled_net = ruleset->layer.handled.net;
+ __entry->scoped = ruleset->layer.handled.scope;
),
TP_printk("ruleset=%llx.%llu handled_fs=%s handled_net=%s scoped=%s",