public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-kernel] build: re-enable BTF
@ 2023-01-30 13:27 Fabian Grünbichler
  2023-01-31 16:46 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2023-01-30 13:27 UTC (permalink / raw)
  To: pve-devel

but allow discarding BTF information when loading modules, so that upgrades
which are otherwise ABI compatible still work. this allows using BTF
information when matching and available, while degrading gracefully if the
currently running kernel is not identical to the one that module was built for.

in case of a mismatch, the kernel will log a warning when loading the module,
for example:

Jan 30 13:57:58 test kernel: BPF:          type_id=184 bits_offset=4096
Jan 30 13:57:58 test kernel: BPF:
Jan 30 13:57:58 test kernel: BPF: Invalid name
Jan 30 13:57:58 test kernel: BPF:
Jan 30 13:57:58 test kernel: failed to validate module [bonding] BTF: -22

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---

Notes:
    two things that are worth mentioning:
    - BTF information will only be generated if paholes is new enough, for bullseye
      this means the version from backports, where it got split out of the dwarves
      package - it might be worth it to enforce this in d/control.in and upload it
      to our -devel repository
    - this will cause an ABI bump
    
    tested by doing two test builds
    - first with this patch + ABI bump
    - second rebuild with additional package revision bump on top, BTF offsets
      will change

 debian/rules                                  |  1 +
 ...de-unregister_netdevice-refcount-lea.patch |  4 +++
 ...-bug-introduce-ASSERT_STRUCT_OFFSET.patch} |  4 +++
 ...rate-split-BTF-type-info-per-default.patch | 28 -------------------
 ...update-the-emulation-mode-after-rsm.patch} |  4 +++
 ...smm-add-structs-for-KVM-s-smram-lay.patch} |  4 +++
 ...smm-use-smram-structs-in-the-common.patch} |  4 +++
 ...smm-use-smram-struct-for-32-bit-smr.patch} |  4 +++
 ...smm-use-smram-struct-for-64-bit-smr.patch} |  4 +++
 ... 0012-KVM-x86-SVM-use-smram-structs.patch} |  4 +++
 ...-save-SVM-state-to-SMRAM-when-VM-is.patch} |  4 +++
 ...smm-preserve-interrupt-shadow-in-SM.patch} |  4 +++
 ...irdma-Report-the-correct-link-speed.patch} |  4 +++
 ...pport-of-hw-gro-packets-to-gro-stac.patch} |  4 +++
 ...ortify-Do-not-cast-to-unsigned-char.patch} |  4 +++
 15 files changed, 53 insertions(+), 28 deletions(-)
 rename patches/kernel/{0007-bug-introduce-ASSERT_STRUCT_OFFSET.patch => 0006-bug-introduce-ASSERT_STRUCT_OFFSET.patch} (92%)
 delete mode 100644 patches/kernel/0006-do-not-generate-split-BTF-type-info-per-default.patch
 rename patches/kernel/{0008-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch => 0007-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch} (88%)
 rename patches/kernel/{0009-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch => 0008-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch} (98%)
 rename patches/kernel/{0010-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch => 0009-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch} (97%)
 rename patches/kernel/{0011-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch => 0010-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch} (98%)
 rename patches/kernel/{0012-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch => 0011-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch} (98%)
 rename patches/kernel/{0013-KVM-x86-SVM-use-smram-structs.patch => 0012-KVM-x86-SVM-use-smram-structs.patch} (95%)
 rename patches/kernel/{0014-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch => 0013-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch} (89%)
 rename patches/kernel/{0015-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch => 0014-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch} (97%)
 rename patches/kernel/{0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch => 0015-Revert-RDMA-irdma-Report-the-correct-link-speed.patch} (93%)
 rename patches/kernel/{0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch => 0016-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch} (96%)
 rename patches/kernel/{0018-Revert-fortify-Do-not-cast-to-unsigned-char.patch => 0017-Revert-fortify-Do-not-cast-to-unsigned-char.patch} (86%)

diff --git a/debian/rules b/debian/rules
index 4a7a742..1d0d615 100755
--- a/debian/rules
+++ b/debian/rules
@@ -78,6 +78,7 @@ PVE_CONFIG_OPTS= \
 -d CONFIG_DEFAULT_SECURITY_DAC \
 -e CONFIG_DEFAULT_SECURITY_APPARMOR \
 --set-str CONFIG_DEFAULT_SECURITY apparmor \
+-e CONFIG_MODULE_ALLOW_BTF_MISMATCH \
 -d CONFIG_UNWINDER_ORC \
 -d CONFIG_UNWINDER_GUESS \
 -e CONFIG_UNWINDER_FRAME_POINTER \
diff --git a/patches/kernel/0005-net-core-downgrade-unregister_netdevice-refcount-lea.patch b/patches/kernel/0005-net-core-downgrade-unregister_netdevice-refcount-lea.patch
index 4862123..1cb3f9a 100644
--- a/patches/kernel/0005-net-core-downgrade-unregister_netdevice-refcount-lea.patch
+++ b/patches/kernel/0005-net-core-downgrade-unregister_netdevice-refcount-lea.patch
@@ -3,8 +3,12 @@ From: Thomas Lamprecht <t.lamprecht@proxmox.com>
 Date: Wed, 7 Oct 2020 17:18:28 +0200
 Subject: [PATCH] net: core: downgrade unregister_netdevice refcount leak from
  emergency to error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  net/core/dev.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/patches/kernel/0007-bug-introduce-ASSERT_STRUCT_OFFSET.patch b/patches/kernel/0006-bug-introduce-ASSERT_STRUCT_OFFSET.patch
similarity index 92%
rename from patches/kernel/0007-bug-introduce-ASSERT_STRUCT_OFFSET.patch
rename to patches/kernel/0006-bug-introduce-ASSERT_STRUCT_OFFSET.patch
index 245bb95..9bceac6 100644
--- a/patches/kernel/0007-bug-introduce-ASSERT_STRUCT_OFFSET.patch
+++ b/patches/kernel/0006-bug-introduce-ASSERT_STRUCT_OFFSET.patch
@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:49:59 +0300
 Subject: [PATCH] bug: introduce ASSERT_STRUCT_OFFSET
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 ASSERT_STRUCT_OFFSET allows to assert during the build of
 the kernel that a field in a struct have an expected offset.
@@ -12,6 +15,7 @@ places in KVM.
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/kvm/vmx/vmcs12.h | 5 ++---
  include/linux/build_bug.h | 9 +++++++++
diff --git a/patches/kernel/0006-do-not-generate-split-BTF-type-info-per-default.patch b/patches/kernel/0006-do-not-generate-split-BTF-type-info-per-default.patch
deleted file mode 100644
index 48fbf70..0000000
--- a/patches/kernel/0006-do-not-generate-split-BTF-type-info-per-default.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
-Date: Thu, 14 Sep 2017 11:09:58 +0200
-Subject: [PATCH] do not generate split BTF type info per default
-
-This reverts commit a8ed1a0607cfa5478ff6009539f44790c4d0956d.
-
-It breaks ZFS sometimes:
-https://github.com/openzfs/zfs/issues/12301#issuecomment-873303739
-
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- lib/Kconfig.debug | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
-index 12dfe6691dd5..930bbd7ddffd 100644
---- a/lib/Kconfig.debug
-+++ b/lib/Kconfig.debug
-@@ -365,7 +365,7 @@ config PAHOLE_HAS_BTF_TAG
- 	  these attributes, so make the config depend on CC_IS_CLANG.
- 
- 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.
diff --git a/patches/kernel/0008-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch b/patches/kernel/0007-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch
similarity index 88%
rename from patches/kernel/0008-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch
rename to patches/kernel/0007-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch
index 9c225a8..620609e 100644
--- a/patches/kernel/0008-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch
+++ b/patches/kernel/0007-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch
@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:02 +0300
 Subject: [PATCH] KVM: x86: emulator: update the emulation mode after rsm
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 This ensures that RIP will be correctly written back,
 because the RSM instruction can switch the CPU mode from
@@ -12,6 +15,7 @@ while the guest runs a code from an address > 32 bit.
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/kvm/emulate.c | 5 +++++
  1 file changed, 5 insertions(+)
diff --git a/patches/kernel/0009-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch b/patches/kernel/0008-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch
similarity index 98%
rename from patches/kernel/0009-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch
rename to patches/kernel/0008-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch
index 546eee7..221b508 100644
--- a/patches/kernel/0009-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch
+++ b/patches/kernel/0008-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch
@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:05 +0300
 Subject: [PATCH] KVM: x86: emulator/smm: add structs for KVM's smram layout
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Those structs will be used to read/write the smram state image.
 
@@ -10,6 +13,7 @@ layout that is used by real Intel/AMD cpus.
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/kvm/emulate.c     |   6 +
  arch/x86/kvm/kvm_emulate.h | 218 +++++++++++++++++++++++++++++++++++++
diff --git a/patches/kernel/0010-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch b/patches/kernel/0009-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
similarity index 97%
rename from patches/kernel/0010-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
rename to patches/kernel/0009-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
index 6a46cc5..cabb73e 100644
--- a/patches/kernel/0010-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
+++ b/patches/kernel/0009-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
@@ -2,11 +2,15 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:06 +0300
 Subject: [PATCH] KVM: x86: emulator/smm: use smram structs in the common code
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Switch from using a raw array to 'union kvm_smram'.
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/include/asm/kvm_host.h |  5 +++--
  arch/x86/kvm/emulate.c          | 12 +++++++-----
diff --git a/patches/kernel/0011-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch b/patches/kernel/0010-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch
similarity index 98%
rename from patches/kernel/0011-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch
rename to patches/kernel/0010-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch
index 40234cf..31847cf 100644
--- a/patches/kernel/0011-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch
+++ b/patches/kernel/0010-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch
@@ -3,12 +3,16 @@ From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:07 +0300
 Subject: [PATCH] KVM: x86: emulator/smm: use smram struct for 32 bit smram
  load/restore
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Use kvm_smram_state_32 struct to save/restore 32 bit SMM state
 (used when X86_FEATURE_LM is not present in the guest CPUID).
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/kvm/emulate.c | 81 +++++++++++++++---------------------------
  arch/x86/kvm/x86.c     | 75 +++++++++++++++++---------------------
diff --git a/patches/kernel/0012-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch b/patches/kernel/0011-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch
similarity index 98%
rename from patches/kernel/0012-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch
rename to patches/kernel/0011-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch
index aa962a5..ee7b219 100644
--- a/patches/kernel/0012-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch
+++ b/patches/kernel/0011-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch
@@ -3,6 +3,9 @@ From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:08 +0300
 Subject: [PATCH] KVM: x86: emulator/smm: use smram struct for 64 bit smram
  load/restore
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Use kvm_smram_state_64 struct to save/restore the 64 bit SMM state
 (used when X86_FEATURE_LM is present in the guest CPUID,
@@ -10,6 +13,7 @@ regardless of 32-bitness of the guest).
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/kvm/emulate.c | 88 ++++++++++++++----------------------------
  arch/x86/kvm/x86.c     | 75 ++++++++++++++++-------------------
diff --git a/patches/kernel/0013-KVM-x86-SVM-use-smram-structs.patch b/patches/kernel/0012-KVM-x86-SVM-use-smram-structs.patch
similarity index 95%
rename from patches/kernel/0013-KVM-x86-SVM-use-smram-structs.patch
rename to patches/kernel/0012-KVM-x86-SVM-use-smram-structs.patch
index 0cbb708..ac298b5 100644
--- a/patches/kernel/0013-KVM-x86-SVM-use-smram-structs.patch
+++ b/patches/kernel/0012-KVM-x86-SVM-use-smram-structs.patch
@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:09 +0300
 Subject: [PATCH] KVM: x86: SVM: use smram structs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 This removes the last user of put_smstate/GET_SMSTATE so
 remove these functions as well.
@@ -11,6 +14,7 @@ on non long mode capable guest CPU with a running nested guest.
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/include/asm/kvm_host.h |  6 ------
  arch/x86/kvm/svm/svm.c          | 21 ++++++---------------
diff --git a/patches/kernel/0014-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch b/patches/kernel/0013-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch
similarity index 89%
rename from patches/kernel/0014-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch
rename to patches/kernel/0013-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch
index fedb9bd..efbeab1 100644
--- a/patches/kernel/0014-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch
+++ b/patches/kernel/0013-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch
@@ -3,6 +3,9 @@ From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:10 +0300
 Subject: [PATCH] KVM: x86: SVM: don't save SVM state to SMRAM when VM is not
  long mode capable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 When the guest CPUID doesn't have support for long mode, 32 bit SMRAM
 layout is used and it has no support for preserving EFER and/or SVM
@@ -14,6 +17,7 @@ mode.
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/kvm/svm/svm.c | 9 +++++++++
  1 file changed, 9 insertions(+)
diff --git a/patches/kernel/0015-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch b/patches/kernel/0014-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch
similarity index 97%
rename from patches/kernel/0015-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch
rename to patches/kernel/0014-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch
index 7248b78..a5e3101 100644
--- a/patches/kernel/0015-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch
+++ b/patches/kernel/0014-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch
@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Maxim Levitsky <mlevitsk@redhat.com>
 Date: Wed, 3 Aug 2022 18:50:11 +0300
 Subject: [PATCH] KVM: x86: emulator/smm: preserve interrupt shadow in SMRAM
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 When #SMI is asserted, the CPU can be in interrupt shadow
 due to sti or mov ss.
@@ -23,6 +26,7 @@ window still being set in the VMCS.
 
 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  arch/x86/kvm/emulate.c     | 17 ++++++++++++++---
  arch/x86/kvm/kvm_emulate.h | 10 ++++++----
diff --git a/patches/kernel/0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch b/patches/kernel/0015-Revert-RDMA-irdma-Report-the-correct-link-speed.patch
similarity index 93%
rename from patches/kernel/0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch
rename to patches/kernel/0015-Revert-RDMA-irdma-Report-the-correct-link-speed.patch
index accfb6c..18a6565 100644
--- a/patches/kernel/0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch
+++ b/patches/kernel/0015-Revert-RDMA-irdma-Report-the-correct-link-speed.patch
@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht@proxmox.com>
 Date: Sat, 7 Jan 2023 13:48:41 +0100
 Subject: [PATCH] Revert "RDMA/irdma: Report the correct link speed"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 seem to cause a regression with some NICs:
 https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb621A@mail.gmail.com/
@@ -9,6 +12,7 @@ https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb62
 This reverts commit e8553504e366c8a47d1f6156c30d6eb9778cda13.
 
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  drivers/infiniband/hw/irdma/verbs.c | 35 ++++++++++++++++++++++++++---
  1 file changed, 32 insertions(+), 3 deletions(-)
diff --git a/patches/kernel/0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch b/patches/kernel/0016-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch
similarity index 96%
rename from patches/kernel/0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch
rename to patches/kernel/0016-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch
index da34516..a18708e 100644
--- a/patches/kernel/0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch
+++ b/patches/kernel/0016-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch
@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht@proxmox.com>
 Date: Sat, 7 Jan 2023 13:50:22 +0100
 Subject: [PATCH] Revert "gro: add support of (hw)gro packets to gro stack"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Seems to be the cause of a regression in network performance:
 https://lore.kernel.org/netdev/CAK8fFZ5pzMaw3U1KXgC_OK4shKGsN=HDcR62cfPOuL0umXE1Ww@mail.gmail.com/
@@ -9,6 +12,7 @@ https://lore.kernel.org/netdev/CAK8fFZ5pzMaw3U1KXgC_OK4shKGsN=HDcR62cfPOuL0umXE1
 This reverts commit 5eddb24901ee49eee23c0bfce6af2e83fd5679bd.
 
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  net/core/gro.c         | 18 ++++--------------
  net/ipv4/tcp_offload.c | 17 ++---------------
diff --git a/patches/kernel/0018-Revert-fortify-Do-not-cast-to-unsigned-char.patch b/patches/kernel/0017-Revert-fortify-Do-not-cast-to-unsigned-char.patch
similarity index 86%
rename from patches/kernel/0018-Revert-fortify-Do-not-cast-to-unsigned-char.patch
rename to patches/kernel/0017-Revert-fortify-Do-not-cast-to-unsigned-char.patch
index 6d7f479..892e153 100644
--- a/patches/kernel/0018-Revert-fortify-Do-not-cast-to-unsigned-char.patch
+++ b/patches/kernel/0017-Revert-fortify-Do-not-cast-to-unsigned-char.patch
@@ -2,10 +2,14 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Thomas Lamprecht <t.lamprecht@proxmox.com>
 Date: Tue, 10 Jan 2023 08:52:40 +0100
 Subject: [PATCH] Revert "fortify: Do not cast to "unsigned char""
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 This reverts commit 106b7a61c488d2022f44e3531ce33461c7c0685f.
 
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 ---
  include/linux/fortify-string.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied:  [PATCH pve-kernel] build: re-enable BTF
  2023-01-30 13:27 [pve-devel] [PATCH pve-kernel] build: re-enable BTF Fabian Grünbichler
@ 2023-01-31 16:46 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-01-31 16:46 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Grünbichler

Am 30/01/2023 um 14:27 schrieb Fabian Grünbichler:
> but allow discarding BTF information when loading modules, so that upgrades
> which are otherwise ABI compatible still work. this allows using BTF
> information when matching and available, while degrading gracefully if the
> currently running kernel is not identical to the one that module was built for.
> 
> in case of a mismatch, the kernel will log a warning when loading the module,
> for example:
> 
> Jan 30 13:57:58 test kernel: BPF:          type_id=184 bits_offset=4096
> Jan 30 13:57:58 test kernel: BPF:
> Jan 30 13:57:58 test kernel: BPF: Invalid name
> Jan 30 13:57:58 test kernel: BPF:
> Jan 30 13:57:58 test kernel: failed to validate module [bonding] BTF: -22
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> 
> Notes:
>     two things that are worth mentioning:
>     - BTF information will only be generated if paholes is new enough, for bullseye
>       this means the version from backports, where it got split out of the dwarves
>       package - it might be worth it to enforce this in d/control.in and upload it
>       to our -devel repository
>     - this will cause an ABI bump
>     
>     tested by doing two test builds
>     - first with this patch + ABI bump
>     - second rebuild with additional package revision bump on top, BTF offsets
>       will change
> 
>  debian/rules                                  |  1 +
>  ...de-unregister_netdevice-refcount-lea.patch |  4 +++
>  ...-bug-introduce-ASSERT_STRUCT_OFFSET.patch} |  4 +++
>  ...rate-split-BTF-type-info-per-default.patch | 28 -------------------
>  ...update-the-emulation-mode-after-rsm.patch} |  4 +++
>  ...smm-add-structs-for-KVM-s-smram-lay.patch} |  4 +++
>  ...smm-use-smram-structs-in-the-common.patch} |  4 +++
>  ...smm-use-smram-struct-for-32-bit-smr.patch} |  4 +++
>  ...smm-use-smram-struct-for-64-bit-smr.patch} |  4 +++
>  ... 0012-KVM-x86-SVM-use-smram-structs.patch} |  4 +++
>  ...-save-SVM-state-to-SMRAM-when-VM-is.patch} |  4 +++
>  ...smm-preserve-interrupt-shadow-in-SM.patch} |  4 +++
>  ...irdma-Report-the-correct-link-speed.patch} |  4 +++
>  ...pport-of-hw-gro-packets-to-gro-stac.patch} |  4 +++
>  ...ortify-Do-not-cast-to-unsigned-char.patch} |  4 +++
>  15 files changed, 53 insertions(+), 28 deletions(-)
>  rename patches/kernel/{0007-bug-introduce-ASSERT_STRUCT_OFFSET.patch => 0006-bug-introduce-ASSERT_STRUCT_OFFSET.patch} (92%)
>  delete mode 100644 patches/kernel/0006-do-not-generate-split-BTF-type-info-per-default.patch
>  rename patches/kernel/{0008-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch => 0007-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch} (88%)
>  rename patches/kernel/{0009-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch => 0008-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch} (98%)
>  rename patches/kernel/{0010-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch => 0009-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch} (97%)
>  rename patches/kernel/{0011-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch => 0010-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch} (98%)
>  rename patches/kernel/{0012-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch => 0011-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch} (98%)
>  rename patches/kernel/{0013-KVM-x86-SVM-use-smram-structs.patch => 0012-KVM-x86-SVM-use-smram-structs.patch} (95%)
>  rename patches/kernel/{0014-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch => 0013-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch} (89%)
>  rename patches/kernel/{0015-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch => 0014-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch} (97%)
>  rename patches/kernel/{0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch => 0015-Revert-RDMA-irdma-Report-the-correct-link-speed.patch} (93%)
>  rename patches/kernel/{0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch => 0016-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch} (96%)
>  rename patches/kernel/{0018-Revert-fortify-Do-not-cast-to-unsigned-char.patch => 0017-Revert-fortify-Do-not-cast-to-unsigned-char.patch} (86%)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-31 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 13:27 [pve-devel] [PATCH pve-kernel] build: re-enable BTF Fabian Grünbichler
2023-01-31 16:46 ` [pve-devel] applied: " Thomas Lamprecht

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