Re: [PATCH] ext4: Check for encryption feature before fscrypt_process_policy()

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

 



On Thu, Sep 22, 2016 at 06:38:03PM -0400, Theodore Ts'o wrote:
> 
> I think it's fine to fix it now in upstream.  It might cause some
> problems for Cyanogen developers if they want to try to use an
> upstream kernel and also enable the ext4 encryption feature, but the
> fix to make_ext4fs isn't all that hard.

Would it make sense to at least provide a helpful error message in the kernel
log?  For example:

		if (!ext4_has_feature_encrypt(sb)) {
			ext4_msg(sb, KERN_INFO,
				 "warning: process `%s' tried to set "
				 "encryption policy on filesystem without "
				 "encryption enabled.  This is not supported.  "
				 "Use 'tune2fs -O encrypt' to enable the "
				 "encryption feature flag first.",
				 current->comm);
			return -EOPNOTSUPP;
		}

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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