[pve-devel] [PATCH master/5.13 kernel 2/2] KConfig: disable module BTF debug info

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Dec 1 10:57:48 CET 2021

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 <f.gruenbichler at proxmox.com>
patch number is different depending on branch (11 for 5.13, 9 for
master), but patch applies as-is to both.

note that disabling BTF for modules implies an ABI bump, as there is
some conditional compilation based on that KConfig value..

 patches/kernel/0012-disable-split-btf.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 patches/kernel/0012-disable-split-btf.patch

diff --git a/patches/kernel/0011-disable-split-btf.patch b/patches/kernel/0011-disable-split-btf.patch
new file mode 100644
index 0000000..3f3a498
--- /dev/null
+++ b/patches/kernel/0011-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")
+-	def_bool y
++	def_bool n
+ 	help
+ 	  Generate compact split BTF type information for kernel modules.

More information about the pve-devel mailing list