Patch "ext4: do not advertise encryption support when disabled" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ext4: do not advertise encryption support when disabled
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ext4-do-not-advertise-encryption-support-when-disabled.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c4704a4fbe834eee4109ca064131d440941f6235Mon Sep 17 00:00:00 2001
From: Eric Biggers <[email protected]>
Date: Wed, 12 Oct 2016 23:24:51 -0400
Subject: ext4: do not advertise encryption support when disabled
From: Eric Biggers <[email protected]>
commit c4704a4fbe834eee4109ca064131d440941f6235 upstream.
The sysfs file /sys/fs/ext4/features/encryption was present on kernels compiled with CONFIG_EXT4_FS_ENCRYPTION=n. This was misleading because such kernels do not actually support ext4 encryption. Therefore, only provide this file on kernels compiled with CONFIG_EXT4_FS_ENCRYPTION=y.
Note: since the ext4 feature files are all hardcoded to have a contents of "supported", it really is the presence or absence of the file that is significant, not the contents (and this change reflects that).
--- fs/ext4/sysfs.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/ext4/sysfs.c +4 -0
@@ -223,14 +223,18 @@ static struct attribute *ext4_attrs[] =EXT4_ATTR_FEATURE (lazy_itable_init);EXT4_ATTR_FEATURE (batched_discard);EXT4_ATTR_FEATURE (meta_bg_resize); +#ifdef CONFIG_EXT4_FS_ENCRYPTION EXT4_ATTR_FEATURE (encryption); +#endif EXT4_ATTR_FEATURE (metadata_csum_seed);static struct attribute *ext4_feat_attrs[] = {ATTR_LIST (lazy_itable_init),ATTR_LIST (batched_discard),ATTR_LIST (meta_bg_resize), +#ifdef CONFIG_EXT4_FS_ENCRYPTIONATTR_LIST (encryption), +#endifATTR_LIST (metadata_csum_seed),NULL , };
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/ext4-do-not-advertise-encryption-support-when-disabled.patch