From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: [pve-devel] applied: [PATCH pve-kernel] build: re-enable BTF
Date: Tue, 31 Jan 2023 17:46:49 +0100 [thread overview]
Message-ID: <f65344e8-ba88-afbe-2507-a084db9e6388@proxmox.com> (raw)
In-Reply-To: <20230130132719.1191559-1-f.gruenbichler@proxmox.com>
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!
prev parent reply other threads:[~2023-01-31 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 13:27 [pve-devel] " Fabian Grünbichler
2023-01-31 16:46 ` Thomas Lamprecht [this message]
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=f65344e8-ba88-afbe-2507-a084db9e6388@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.