From 36ba2b8dfc57ce1e61f24b3ee15d9221e7831fcd Mon Sep 17 00:00:00 2001 From: Ryan Sullivan Date: Fri, 29 Mar 2024 11:08:31 -0400 Subject: [PATCH] kpatch-build: handle paravirt absence in Linux v6.8+ Upstream kernel commit f7af6977621a ("x86/paravirt: Remove no longer needed paravirt patching code") v6.8+ removed the .parainstructions section and its paravirt_patch_site struct. Therefore this checks the kernel version and does not export the struct size if the kernel version is >= v6.8.0, avoiding the code path for it in create-diff-object.c entirely. Fixes: https://github.com/dynup/kpatch/issues/1380 Signed-off-by: Ryan Sullivan --- kpatch-build/kpatch-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index 7ae128c..17bf1a4 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -358,7 +358,7 @@ find_special_section_data() { "x86_64") check[a]=true # alt_instr kernel_version_gte 5.10.0 && check[s]=true # static_call_site - [[ -n "$CONFIG_PARAVIRT" ]] && check[p]=true # paravirt_patch_site + [[ -n "$CONFIG_PARAVIRT" ]] && ! kernel_version_gte 6.8.0 && check[p]=true # paravirt_patch_site ;; "ppc64le") check[f]=true # fixup_entry