Re: [PATCH 20/20] ext4: Implement encoding-aware dcache hooks

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

 



On Tue, Jul 03, 2018 at 01:07:00PM -0400, Gabriel Krisman Bertazi wrote:
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 53db9b6c7e33..f292cc5bacda 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4358,6 +4358,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>  		iput(root);
>  		goto failed_mount4;
>  	}
> +
> +	if (sbi->encoding)
> +		sb->s_d_op = &ext4_dentry_ops;
> +

This is going to be potentially problematic for fscrypt (e.g., when
ext4's encryption is enabled, as will be the case in Android's File
Based Encryption).  See the call to d_set_d_op() in
__fscrypt_prepare_lookup in fs/crypto/hooks.c, since d_set_d_op is
going to overwrite sb->s_d_op.

This probably means that the fscrypt code is going to have to be
case-sensitivity aware.  Or we would have to make case folding and fs
encryption to be mutually exclusive, which would be unfortunate, since
Android is going to be a potential user of case folding.

	   	       	 	   	- Ted



[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