From dbeed8e8050381a0f26cae638675c1e51e04f29f Mon Sep 17 00:00:00 2001 From: Yongde Zhang Date: Thu, 1 Aug 2024 23:48:04 +0800 Subject: [PATCH] kpatch-build:ignore paravirt patch site for kernel greater than 6.8 commit 36ba2b8dfc57ce1e61f24b3ee15d9221e7831fcd upstream 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. Signed-off-by: Yongde Zhang --- ...e-paravirt-patch-site-for-kernel-6.8.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/0015-ignore-paravirt-patch-site-for-kernel-6.8.patch diff --git a/patches/0015-ignore-paravirt-patch-site-for-kernel-6.8.patch b/patches/0015-ignore-paravirt-patch-site-for-kernel-6.8.patch new file mode 100644 index 0000000..5b93c8c --- /dev/null +++ b/patches/0015-ignore-paravirt-patch-site-for-kernel-6.8.patch @@ -0,0 +1,22 @@ +From d59a281ad3aaa3c9fa041f55bd0fab4fb58443c6 Mon Sep 17 00:00:00 2001 +From: Yongde Zhang +Date: Thu, 1 Aug 2024 23:46:04 +0800 +Subject: [PATCH] ignore paravirt patch site for kernel >= 6.8 + + +diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build +index 2c55156..f0ae30c 100755 +--- a/kpatch-build/kpatch-build ++++ b/kpatch-build/kpatch-build +@@ -425,7 +425,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 +-- +2.18.2 + -- Gitee