Re: [PATCH] ext4 crypto: fix to check feature status before get policy

2019-09-01 Thread Chao Yu
potentially breaking change. Looking at this again though, the new ioctl > FS_IOC_GET_ENCRYPTION_POLICY_EX *does* do the feature check, which doesn't > match > the documentation, which implies the check isn't done. Also, f2fs does the > check in FS_IOC_GET_ENCRYPTION_POLICY,

Re: [PATCH] ext4 crypto: fix to check feature status before get policy

2019-08-31 Thread Eric Biggers
lies the check isn't done. Also, f2fs does the check in FS_IOC_GET_ENCRYPTION_POLICY, so the filesystems are inconsistent. So, it makes some sense to apply this now. So I've gone ahead and applied the following to fscrypt.git#master, edited a bit from your original pa

Re: [PATCH] ext4 crypto: fix to check feature status before get policy

2019-08-31 Thread Chao Yu
Hi, Is this change not necessary? A month has passed... Thanks, On 2019/8/4 17:56, Chao Yu wrote: > From: Chao Yu > > When getting fscrypto policy via EXT4_IOC_GET_ENCRYPTION_POLICY, if > encryption feature is off, it's better to return EOPNOTSUPP instead > of ENODATA, so let's add ext4_has_fe

[PATCH] ext4 crypto: fix to check feature status before get policy

2019-08-04 Thread Chao Yu
From: Chao Yu When getting fscrypto policy via EXT4_IOC_GET_ENCRYPTION_POLICY, if encryption feature is off, it's better to return EOPNOTSUPP instead of ENODATA, so let's add ext4_has_feature_encrypt() to do the check for that. Signed-off-by: Chao Yu --- fs/ext4/ioctl.c | 6 -- 1 file chan