fs/ioctl: Add a comment to keep the logic in sync with LSM policies
authorGünther Noack <gnoack@google.com>
Fri, 19 Apr 2024 16:11:22 +0000 (16:11 +0000)
committerMickaël Salaün <mic@digikod.net>
Mon, 13 May 2024 04:58:35 +0000 (06:58 +0200)
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.

Suggested-by: Paul Moore <paul@paul-moore.com>
Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20240419161122.2023765-12-gnoack@google.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
fs/ioctl.c

index fb0628e680c40f16fbee3b1b38b8bfcd70d1c980..64776891120c93811ff7f693906e1b9ae5494c09 100644 (file)
@@ -796,6 +796,9 @@ static int ioctl_get_fs_sysfs_path(struct file *file, void __user *argp)
  *
  * When you add any new common ioctls to the switches above and below,
  * please ensure they have compatible arguments in compat mode.
+ *
+ * The LSM mailing list should also be notified of any command additions or
+ * changes, as specific LSMs may be affected.
  */
 static int do_vfs_ioctl(struct file *filp, unsigned int fd,
                        unsigned int cmd, unsigned long arg)