lkml.org 
[lkml]   [2016]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ext4: Check for encryption feature before fscrypt_process_policy()
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

\
 
 \ /
  Last update: 2016-09-23 23:57    [W:0.055 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site