]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
landlock: Add access_mask_subset() helper
authorGünther Noack <gnoack3000@gmail.com>
Fri, 6 Feb 2026 15:11:54 +0000 (16:11 +0100)
committerMickaël Salaün <mic@digikod.net>
Tue, 10 Feb 2026 15:46:48 +0000 (16:46 +0100)
commit45f2a2926b2187d1b08132d2728af50785b007a7
tree05b03a2ebe590bda45a129c520d7d0939e320ffd
parent9adbe8935152c511c1e43a47d69f44f0e969afc8
landlock: Add access_mask_subset() helper

This helper function checks whether an access_mask_t has a subset of the
bits enabled than another one.  This expresses the intent a bit smoother
in the code and does not cost us anything when it gets inlined.

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260206151154.97915-4-gnoack3000@gmail.com
[mic: Improve subject]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/access.h
security/landlock/fs.c