From 25a4d511a1e1b5b206e663718af986a69ebe09bb Mon Sep 17 00:00:00 2001 From: Benjamin Donnachie Date: Sat, 15 Aug 2026 23:48:32 +0100 Subject: [PATCH] kpatch-cc: exclude arch/x86/platform/pvh/* from diffing arch/x86/platform/pvh/head.o is Xen PVH boot entry code: it runs exactly once, very early at boot, before the kernel proper (and therefore before livepatch infrastructure) is even up. It can never legitimately be part of any livepatch. kpatch-cc already excludes the same category of early-boot-only, never-livepatchable code (arch/x86/boot/*, arch/x86/entry/vdso/*, arch/x86/purgatory/*, arch/x86/realmode/*, the EFI stub, etc.) from being copied into the orig/patched diffing pipeline at all. arch/x86/platform/pvh/* was simply missing from that list. Without this, a patch series that happens to touch a widely-included header (kpatch-build recompiles any file Kbuild considers stale, not just the files a patch series actually changes) can drag pvh/head.o into diffing, where its unusual 32-bit relocations and low-level address arithmetic can trip create-diff-object in ways unrelated to any real patch content. Reproduced building a real cumulative EL9 5.14 kernel livepatch. Co-authored-by: Claude --- kpatch-build/kpatch-cc | 1 + 1 file changed, 1 insertion(+) diff --git a/kpatch-build/kpatch-cc b/kpatch-build/kpatch-cc index ad23df932..566acec82 100755 --- a/kpatch-build/kpatch-cc +++ b/kpatch-build/kpatch-cc @@ -33,6 +33,7 @@ if [[ "$TOOLCHAINCMD" =~ ^(.*-)?gcc$ || "$TOOLCHAINCMD" =~ ^(.*-)?clang$ ]] ; th .tmp_kallsyms2.o|\ arch/x86/boot/*|\ arch/x86/entry/vdso/*|\ + arch/x86/platform/pvh/*|\ arch/x86/purgatory/*|\ arch/x86/realmode/*|\ arch/x86/tools/*|\