Skip to content

Commit 03cc9d6

Browse files
gnoacksweettea
authored andcommitted
fs/ioctl: Add a comment to keep the logic in sync with the Landlock LSM
Landlock's IOCTL support needs to partially replicate the list of IOCTLs from do_vfs_ioctl(). The list of commands implemented in do_vfs_ioctl() should be kept in sync with Landlock's IOCTL policies. Signed-off-by: Günther Noack <gnoack@google.com> Link: https://lore.kernel.org/r/20240327131040.158777-11-gnoack@google.com Signed-off-by: Mickaël Salaün <mic@digikod.net>
1 parent 2bf8bf0 commit 03cc9d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/ioctl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ static int ioctl_get_fs_sysfs_path(struct file *file, void __user *argp)
796796
*
797797
* When you add any new common ioctls to the switches above and below,
798798
* please ensure they have compatible arguments in compat mode.
799+
*
800+
* The commands which are implemented here should be kept in sync with the IOCTL
801+
* security policies in the Landlock LSM.
799802
*/
800803
static int do_vfs_ioctl(struct file *filp, unsigned int fd,
801804
unsigned int cmd, unsigned long arg)

0 commit comments

Comments
 (0)