public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH master/5.13 kernel 2/2] KConfig: disable module BTF debug info
Date: Wed,  1 Dec 2021 10:57:48 +0100	[thread overview]
Message-ID: <20211201095748.1064982-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20211201095748.1064982-1-f.gruenbichler@proxmox.com>

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@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")
+ 
+ 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.
-- 
2.30.2





  reply	other threads:[~2021-12-01  9:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  9:57 [pve-devel] [PATCH master/5.13 kernel 1/2] d/control: add zstd to B-D Fabian Grünbichler
2021-12-01  9:57 ` Fabian Grünbichler [this message]
2021-12-14 11:46 ` Thomas Lamprecht
2021-12-14 13:39   ` [pve-devel] applied-series: " Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211201095748.1064982-2-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal