Re: [PATCH 3/3] ext4: add a new ioctl EXT4_IOC_GETSTATE

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

 



On Fri, Aug 09, 2019 at 02:18:31PM -0400, Theodore Ts'o wrote:
> The new ioctl EXT4_IOC_GETSTATE returns some of the dynamic state of
> an ext4 inode for debugging purposes.
> 
> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
> ---
>  fs/ext4/ext4.h  | 11 +++++++++++
>  fs/ext4/ioctl.c | 17 +++++++++++++++++
>  2 files changed, 28 insertions(+)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index f6c305b43ffa..58b7a0905186 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -651,6 +651,7 @@ enum {
>  #define EXT4_IOC_GET_ENCRYPTION_POLICY	FS_IOC_GET_ENCRYPTION_POLICY
>  /* ioctl codes 19--2F are reserved for fscrypt */
>  #define EXT4_IOC_CLEAR_ES_CACHE		_IO('f', 30)
> +#define EXT4_IOC_GETSTATE		_IOW('f', 30, __u32)

30 == 0x1e overlaps with the range claimed to be reserved for fscrypt.

Also, these two new ioctls are both number 30, which means they can't be
controlled separately by SELinux, which only looks at the number.

- Eric



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux