]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(crypt): always install s390 crypto modules
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Thu, 3 Apr 2025 05:31:10 +0000 (07:31 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 16 Apr 2025 15:40:41 +0000 (11:40 -0400)
Not only are the specific encryption modules not being installed on s390/s390x
in non-hostonly mode, but also it's failing the detection of the kernel modules
needed to decrypt PAES-encrypted volumes in hostonly mode via dmsetup. So,
since the increase in size is not that much (~ 150K), always add all the drivers
under s390/crypto in this architecture.

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

index 5ca4dc6011aebd500e017e1c194b899dee82bade..40018b979282bf8ecf3d689fd50f77aa4b7c314f 100755 (executable)
@@ -23,7 +23,13 @@ depends() {
 
 # called by dracut
 installkernel() {
-    hostonly="" instmods drbg dm_crypt
+    local _arch=${DRACUT_ARCH:-$(uname -m)}
+    local _s390drivers=
+    if [[ $_arch == "s390" ]] || [[ $_arch == "s390x" ]]; then
+        _s390drivers="=drivers/s390/crypto"
+    fi
+
+    hostonly="" instmods drbg dm_crypt ${_s390drivers:+"$_s390drivers"}
 
     # in case some of the crypto modules moved from compiled in
     # to module based, try to install those modules