Thread (22 messages) 22 messages, 3 authors, 1h ago

Re: [PATCH v6 2/8] landlock: Wrap per-layer access masks in struct layer_config

flat view

From: sashiko-bot@kernel.org
Date: 2026-10-14 08:32:37

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 <redacted>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261014082718.1435842-1-mic@digikod.net?part=2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help