From 64f4d67d9e094588c6dce3dbe19f436ee803fe60 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 7 Jun 2018 16:18:34 +0100 Subject: [PATCH] ext4: Fix duplicate softdep fields in module info We no longer need to add the crypto-aes or crypto-ecb dependencies because ext4 uses the common encryption code in fscrypto (and has a regular symbol dependency on it). Since upstream added a softdep on "crc32c", we don't actually need to change ext4 at all now. But let's replace it with "crypto-crc32c", since that's the module alias the crypto subsystem will actually request and is consistent with the softdep we add to other filesystems. --- debian/changelog | 3 +++ ...ule_softdep-declarations-for-hard-coded-cr.patch | 13 +++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index f4fab4ebf..1080229ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -288,6 +288,9 @@ linux (4.16.13-1) UNRELEASED; urgency=medium * hardening: enable FORTIFY_SOURCE, disable HARDENED_USERCOPY_FALLBACK * [x86] hardening: enable REFCOUNT_FULL + [ Ben Hutchings ] + * ext4: Fix duplicate softdep fields in module info + -- Salvatore Bonaccorso Wed, 30 May 2018 08:41:30 +0200 linux (4.16.12-1) unstable; urgency=medium diff --git a/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch b/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch index 9845511d7..e97ab6efd 100644 --- a/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch +++ b/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch @@ -26,19 +26,12 @@ Signed-off-by: Ben Hutchings +MODULE_SOFTDEP("pre: crypto-aes crypto-ecb"); --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5868,6 +5868,14 @@ static void __exit ext4_exit_fs(void) +@@ -5880,6 +5880,6 @@ static void __exit ext4_exit_fs(void) MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Fourth Extended Filesystem"); MODULE_LICENSE("GPL"); -+ -+#ifdef CONFIG_EXT4_FS_ENCRYPTION -+#define EXT4_ENC_EXTRA_SOFTDEPS " crypto-aes crypto-ecb" -+#else -+#define EXT4_ENC_EXTRA_SOFTDEPS "" -+#endif -+MODULE_SOFTDEP("pre: crypto-crc32c" EXT4_ENC_EXTRA_SOFTDEPS); -+ - MODULE_SOFTDEP("pre: crc32c"); +-MODULE_SOFTDEP("pre: crc32c"); ++MODULE_SOFTDEP("pre: crypto-crc32c"); module_init(ext4_init_fs) module_exit(ext4_exit_fs) --- a/fs/f2fs/super.c