]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Install crypto modules in 90kernel-modules
authorHarald Hoyer <harald@redhat.com>
Fri, 24 Apr 2020 09:05:49 +0000 (11:05 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 24 Apr 2020 09:40:15 +0000 (11:40 +0200)
We don't want to play catch up with hash and encryption algorithms.
To be safe, just use the hammer and include all crypto.

Fixes https://github.com/dracutdevs/dracut/issues/802

modules.d/90btrfs/module-setup.sh
modules.d/90crypt/module-setup.sh
modules.d/90kernel-modules/module-setup.sh

index 66a254e1ffa224bae4db335de4203569c108a22d..79f89a503dc1639cde0bd7e2a9d039d7065036b3 100755 (executable)
@@ -26,8 +26,6 @@ depends() {
 # called by dracut
 installkernel() {
     instmods btrfs
-    # Make sure btfs can use fast crc32c implementations where available (bsc#1011554)
-    instmods crc32c-intel
 }
 
 # called by dracut
index 3ee4c5458ae301e1d0a98b70468bafaf04b1a453..a9dda7341b615ff3dd01ae6f929974206b54aaf5 100755 (executable)
@@ -25,11 +25,7 @@ depends() {
 # called by dracut
 installkernel() {
     hostonly="" instmods drbg
-    arch=$(uname -m)
-    [[ $arch == x86_64 ]] && arch=x86
-    [[ $arch == s390x ]] && arch=s390
-    [[ $arch == aarch64 ]] && arch=arm64
-    instmods dm_crypt =crypto =drivers/crypto =arch/$arch/crypto
+    instmods dm_crypt
 }
 
 # called by dracut
index bc3810cc4434f04bfc42b3042ed4234cb8d2cb41..28d291eb635038c9b6d14ff5a4339c2349a41b41 100755 (executable)
@@ -104,6 +104,15 @@ installkernel() {
         elif [[ "${host_fs_types[*]}" ]]; then
             hostonly='' instmods "${host_fs_types[@]}"
         fi
+
+        arch=${DRACUT_ARCH:-$(uname -m)}
+
+        # We don't want to play catch up with hash and encryption algorithms.
+        # To be safe, just use the hammer and include all crypto.
+        [[ $arch == x86_64 ]] && arch=x86
+        [[ $arch == s390x ]] && arch=s390
+        [[ $arch == aarch64 ]] && arch=arm64
+        instmods "=crypto" "=arch/$arch/crypto" "=drivers/crypto"
     fi
     :
 }