]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
landlock: Add backwards compatibility for restrict flags
authorSamasth Norway Ananda <samasth.norway.ananda@oracle.com>
Wed, 28 Jan 2026 03:18:10 +0000 (19:18 -0800)
committerMickaël Salaün <mic@digikod.net>
Fri, 6 Feb 2026 16:54:42 +0000 (17:54 +0100)
commit6100f2904e0ea1f2c832ab6e93573fae47d3b13e
tree7b1b20471196a0ae4eb1a40d11a4a39902d41e29
parentd90ba69e3335aba96c25a0ea7d46c5c115cd4756
landlock: Add backwards compatibility for restrict flags

Add backwards compatibility handling for the restrict flags introduced
in ABI version 7. This is shown as a separate code block (similar to
the ruleset_attr handling in the switch statement) because restrict flags
are passed to landlock_restrict_self() rather than being part of the
ruleset attributes.

Also fix misleading description of the /usr rule which incorrectly
stated it "only allow[s] reading" when the code actually allows both
reading and executing (LANDLOCK_ACCESS_FS_EXECUTE is included in
allowed_access).

Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260128031814.2945394-2-samasth.norway.ananda@oracle.com
[mic: Rebased and fixed conflict]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Documentation/userspace-api/landlock.rst