[SRU][xenial/hwe][PATCH v2 1/1] UBUNTU: [Packaging] HWE: disable CONFIG_MODVERSIONS

Kleber Sacilotto de Souza kleber.souza at canonical.com
Fri Apr 9 09:42:47 UTC 2021


BugLink: https://bugs.launchpad.net/bugs/1922997

Enabling CONFIG_MODVERSIONS on Xenial is causing the modules to fail
loading on ppc64el systems. Disable it for now on all architectures via
the local-mangle file.

CONFIG_MODULE_REL_CRCS also needs to be removed from the configs as it
depends on CONFIG_MODVERSIONS.

Also unsets CONFIG_SYSTEM_TRUSTED_KEYS as the keys can't be used with
CONFIG_MODVERSIONS disabled.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
---
 debian.hwe/scripts/helpers/local-mangle | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/debian.hwe/scripts/helpers/local-mangle b/debian.hwe/scripts/helpers/local-mangle
index 125c5b251bce..7ffc3a7a3764 100755
--- a/debian.hwe/scripts/helpers/local-mangle
+++ b/debian.hwe/scripts/helpers/local-mangle
@@ -9,3 +9,12 @@ sed -i /snapdragon/d ${DEBIAN}/d-i/kernel-versions
 sed -i '/_snapdragon/d' ${DEBIAN}/rules.d/arm64.mk
 sed -i 's/^\(flavo.*\)\ssnapdragon\(.*\)$/\1\2/' ${DEBIAN}/rules.d/arm64.mk
 rm -f ${DEBIAN}/config/arm64/config.flavour.snapdragon
+
+# Disable CONFIG_MODVERSIONS and restore CONFIG_SYSTEM_TRUSTED_KEYS for
+# linux-hwe and update annotations accordingly (LP: #1922997)
+sed -i 's/^CONFIG_MODVERSIONS=y/# CONFIG_MODVERSIONS is not set/' ${DEBIAN}/config/config.common.ubuntu
+sed -i '/^CONFIG_MODULE_REL_CRCS=y/d' ${DEBIAN}/config/config.common.ubuntu
+sed -i "s/^CONFIG_MODVERSIONS[[:space:]]*policy<.*/CONFIG_MODVERSIONS                              policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'i386': 'n', 'ppc64el': 'n', 's390x': 'n'}>/" ${DEBIAN}/config/annotations
+sed -i "/^CONFIG_MODVERSIONS[[:space:]]*mark<ENFORCED>.*/d" ${DEBIAN}/config/annotations
+sed -i 's/^CONFIG_SYSTEM_TRUSTED_KEYS=.*/CONFIG_SYSTEM_TRUSTED_KEYS=""/' ${DEBIAN}/config/config.common.ubuntu
+sed -i "s/^CONFIG_SYSTEM_TRUSTED_KEYS[[:space:]]*policy<.*/CONFIG_SYSTEM_TRUSTED_KEYS                      policy<{'amd64': '\"\"', 'arm64': '\"\"', 'armhf': '\"\"', 'i386': '\"\"', 'ppc64el': '\"\"', 's390x': '\"\"'}>/" ${DEBIAN}/config/annotations
-- 
2.27.0




More information about the kernel-team mailing list