[pve-devel] applied: [PATCH pve-kernel] build: re-enable BTF
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Jan 31 17:46:49 CET 2023
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 at 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!
More information about the pve-devel
mailing list