Re: [PATCH v13 10/10] fs/ioctl: Add a comment to keep the logic in sync with the Landlock LSM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 27, 2024 at 01:10:40PM +0000, Günther Noack wrote:
> 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@xxxxxxxxxx>
> ---
>  fs/ioctl.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/ioctl.c b/fs/ioctl.c
> index 1d5abfdf0f22..661b46125669 100644
> --- a/fs/ioctl.c
> +++ b/fs/ioctl.c
> @@ -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 commands which are implemented here should be kept in sync with the IOCTL
> + * security policies in the Landlock LSM.

Suggestion:
"with the Landlock IOCTL security policy defined in security/landlock/fs.c"

>   */
>  static int do_vfs_ioctl(struct file *filp, unsigned int fd,
>  			unsigned int cmd, unsigned long arg)
> -- 
> 2.44.0.396.g6e790dbe36-goog
> 
> 




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux