From b6b405015bd94594ac8d7a7f56399a6b240c72aa Mon Sep 17 00:00:00 2001 From: Wardenjohn Date: Mon, 21 Apr 2025 10:38:10 +0800 Subject: [PATCH] (Feat)Disable CONFIG_X86_IBT configure commit 6de56acc29cada1f8141e69e1952d98de5a86b08 upstream With IBT enabled, the kernel build runs objtool not on individual object files, but the post-linked vmlinux.o. Kpatch-build does not currently and may not ever support binary comparison of vmlinux.o, so mark it as not supported for now. With IBT enabled, it causes the compiled symbols to lack the __prefix__ symbol, leading kpatch to incorrectly determine that the symbol has no padding. --- ...l-CONFIG_X86_KERNEL_IBT-as-not-suppo.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 patches/0022-kpatch-build-fail-CONFIG_X86_KERNEL_IBT-as-not-suppo.patch diff --git a/patches/0022-kpatch-build-fail-CONFIG_X86_KERNEL_IBT-as-not-suppo.patch b/patches/0022-kpatch-build-fail-CONFIG_X86_KERNEL_IBT-as-not-suppo.patch new file mode 100644 index 0000000..7569987 --- /dev/null +++ b/patches/0022-kpatch-build-fail-CONFIG_X86_KERNEL_IBT-as-not-suppo.patch @@ -0,0 +1,25 @@ +From 6de56acc29cada1f8141e69e1952d98de5a86b08 Mon Sep 17 00:00:00 2001 +From: Joe Lawrence +Date: Mon, 26 Aug 2024 14:22:28 -0400 +Subject: [PATCH] kpatch-build: fail CONFIG_X86_KERNEL_IBT as not supported + +Signed-off-by: Joe Lawrence +--- + kpatch-build/kpatch-build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build +index 215c823..673f804 100755 +--- a/kpatch-build/kpatch-build ++++ b/kpatch-build/kpatch-build +@@ -1190,6 +1190,7 @@ fi + [[ -n "$CONFIG_DEBUG_INFO_SPLIT" ]] && die "kernel option 'CONFIG_DEBUG_INFO_SPLIT' not supported" + [[ -n "$CONFIG_GCC_PLUGIN_LATENT_ENTROPY" ]] && die "kernel option 'CONFIG_GCC_PLUGIN_LATENT_ENTROPY' not supported" + [[ -n "$CONFIG_GCC_PLUGIN_RANDSTRUCT" ]] && die "kernel option 'CONFIG_GCC_PLUGIN_RANDSTRUCT' not supported" ++[[ -n "$CONFIG_X86_KERNEL_IBT" ]] && die "kernel option 'CONFIG_X86_KERNEL_IBT' not supported" + + # CONFIG_DEBUG_INFO_BTF invokes pahole, for which some versions don't + # support extended ELF sections. Disable the BTF typeinfo generation in +-- +2.37.3 + -- Gitee