From bc1d1913898940cabcea142f75a2a4759790a503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 1 Dec 2021 10:57:48 +0100 Subject: [PATCH] KConfig: disable module BTF debug info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit enabling this effectively makes the debug info of the kernel image part of the kernel <-> module ABI[0], potentially breaking module loading for otherwise compatible kernel/module combinations. there were several user reports[1,2,3,..], and although a workaround exists (re-installing the currently booted version, loading the module, then upgrading again) disabling this until it's clear how to proceed seems like the way to go. disabling via patch is needed, since leaving it unset via `-d` or explicitly disabled via `--set-val` doesn't work - it's auto-enabled based on build-env pahole supporting split BTF generation. 0: https://lore.kernel.org/all/1637926692.uyvrkty41j.astroid@nora.none/ 1: https://forum.proxmox.com/threads/realtek-8156-2-5gbe-usb-nic.69903/#post-433793 2: https://forum.proxmox.com/threads/usb-storage-can-not-be-mounted.100480/ 3: https://forum.proxmox.com/threads/neuer-server-und-probleme.99098/#post-427862 Signed-off-by: Fabian Grünbichler Acked-by: Thomas Lamprecht Reviewed-by: Thomas Lamprecht --- patches/kernel/0009-disable-split-btf.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/kernel/0009-disable-split-btf.patch diff --git a/patches/kernel/0009-disable-split-btf.patch b/patches/kernel/0009-disable-split-btf.patch new file mode 100644 index 0000000..3f3a498 --- /dev/null +++ b/patches/kernel/0009-disable-split-btf.patch @@ -0,0 +1,13 @@ +diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug +index 25dc20175bba..7ff51a3f65e6 100644 +--- a/lib/Kconfig.debug ++++ b/lib/Kconfig.debug +@@ -314,7 +314,7 @@ config PAHOLE_HAS_SPLIT_BTF + def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119") + + config DEBUG_INFO_BTF_MODULES +- def_bool y ++ def_bool n + depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF + help + Generate compact split BTF type information for kernel modules.