mirror of
https://git.proxmox.com/git/pve-kernel
synced 2025-08-02 22:07:10 +00:00

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>
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
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(-)
|
|
|
|
diff --git a/include/linux/fortify-string.h b/include/linux/fortify-string.h
|
|
index 5001a11258e4..1067a8450826 100644
|
|
--- a/include/linux/fortify-string.h
|
|
+++ b/include/linux/fortify-string.h
|
|
@@ -18,7 +18,7 @@ void __write_overflow_field(size_t avail, size_t wanted) __compiletime_warning("
|
|
|
|
#define __compiletime_strlen(p) \
|
|
({ \
|
|
- char *__p = (char *)(p); \
|
|
+ unsigned char *__p = (unsigned char *)(p); \
|
|
size_t __ret = SIZE_MAX; \
|
|
size_t __p_size = __member_size(p); \
|
|
if (__p_size != SIZE_MAX && \
|