]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
landlock: Define access_mask_t to enforce a consistent access mask size
authorMickaël Salaün <mic@digikod.net>
Fri, 6 May 2022 16:10:51 +0000 (18:10 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:25:18 +0000 (09:25 +0200)
commit9f9081bae2e9ed0b9610dc69b505668a35256ba5
tree2befb3051a1718c895b277d4f62434e300856ad4
parentd7448729b70a01ee1b372b3d6ef1b117c4e79d3f
landlock: Define access_mask_t to enforce a consistent access mask size

BugLink: https://bugs.launchpad.net/bugs/1981864
commit 5f2ff33e10843ef51275c8611bdb7b49537aba5d upstream.

Create and use the access_mask_t typedef to enforce a consistent access
mask size and uniformly use a 16-bits type.  This will helps transition
to a 32-bits value one day.

Add a build check to make sure all (filesystem) access rights fit in.
This will be extended with a following commit.

Reviewed-by: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/20220506161102.525323-2-mic@digikod.net
Cc: stable@vger.kernel.org
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
security/landlock/fs.c
security/landlock/fs.h
security/landlock/limits.h
security/landlock/ruleset.c
security/landlock/ruleset.h