
We missed the two patches during the mlnx-ofa_kernel driver upgradtion. We encouter the following error during load the module mlx_compat when IBT(Indirect Branch Tracking) feature is enabled for CPU and CONFIG_X86_KERNEL_IBT is enable by the kernel config file. "Missing ENDBR: __init_backport+0x0/0xff0 [mlx_compat]" Verification: * An ISO image can be built with this commit applied to a repo project of StarlingX's kernel 6.12.18 branch. * The ISO image can be installed to a R760 server without "Missing ENDBR: __init_backport+0x0/0xff0 [mlx_compat]" in dmesg log. The issue can be repduced in the lab without the fix. Closes-Bug: 2110611 Change-Id: I017ee18055368614d404f10ad5d4d05a6b842ad0 Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From 1cab15ad11f0711f4b44fcecdf950a100a6c6bb3 Mon Sep 17 00:00:00 2001
|
|
From: Jiping Ma <jiping.ma2@windriver.com>
|
|
Date: Tue, 25 Jun 2024 02:58:29 +0000
|
|
Subject: [PATCH 2/2] Fix the obsolete module init
|
|
|
|
Update module init call to use kernel provided macros, such
|
|
that they gain correct IBT attributes.
|
|
|
|
We encouter the following error during load the module mlx_compat.
|
|
"Missing ENDBR: __init_backport+0x0/0xff0 [mlx_compat]"
|
|
|
|
Reported-by: Guilherme Batista Leite <guilhermebatista.leite@windriver.com>
|
|
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
|
---
|
|
include/linux/compat-2.6.h | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
|
|
index e8b63ed..f264ffe 100644
|
|
--- a/include/linux/compat-2.6.h
|
|
+++ b/include/linux/compat-2.6.h
|
|
@@ -34,6 +34,8 @@ void mlx_backport_dependency_symbol(void);
|
|
mlx_backport_dependency_symbol(); \
|
|
return initfn(); \
|
|
} \
|
|
- int init_module(void) __copy(initfn) __attribute__((alias("__init_backport")));
|
|
+ int init_module(void) __copy(initfn) \
|
|
+ __attribute__((alias("__init_backport"))); \
|
|
+ ___ADDRESSABLE(init_module, __initdata);
|
|
|
|
#endif /* LINUX_26_COMPAT_H */
|
|
--
|
|
2.47.1
|
|
|