When there are ".." in source object path then current kpatch-gcc can not
handle it correctly:
kpatch-gcc use the following logic to check the objects who got recompiled and
would write the changed
objects to "chagned_objs". But if the path of the input obj is something
like"arch/x86/kvm/../../../virt/kvm/.tmp_kvm_main.o"
then the following logic can not handle it properly, the kvm_main.o will fall
into the "*.*.o" branch.
And kpatch-build will end up with "ERROR: no changed objects found. Check
/root/.kpatch/build.log for more details."
kpatch/kpatch-build/kpatch-gcc:
......
case "$obj" in
*.mod.o|\
*built-in.o|\
vmlinux.o|\
.tmp_kallsyms1.o|\
.tmp_kallsyms2.o|\
init/version.o|\
arch/x86/boot/version.o|\
arch/x86/boot/compressed/eboot.o|\
arch/x86/boot/header.o|\
arch/x86/boot/compressed/efi_stub_64.o|\
arch/x86/boot/compressed/piggy.o|\
kernel/system_certificates.o|\
arch/x86/vdso/*|\
arch/x86/entry/vdso/*|\
drivers/firmware/efi/libstub/*|\
arch/powerpc/kernel/prom_init.o|\
*.*.o)
break
;;
*.o)
mkdir -p
"$KPATCH_GCC_TEMPDIR/orig/$(dirname $obj)"
[[ -e $obj ]] && cp -f "$obj"
"$KPATCH_GCC_TEMPDIR/orig/$obj"
echo "$obj" >>
"$KPATCH_GCC_TEMPDIR/changed_objs"
break
;;
*)
break
;;
esac
......
Signed-off-by: chen xiaoguang <[email protected]>
---
kpatch-build/kpatch-gcc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kpatch-build/kpatch-gcc b/kpatch-build/kpatch-gcc
index e91f4b2..ffa9bc3 100755
--- a/kpatch-build/kpatch-gcc
+++ b/kpatch-build/kpatch-gcc
@@ -38,7 +38,8 @@ if [[ "$TOOLCHAINCMD" = "gcc" ]] ; then
arch/x86/entry/vdso/*|\
drivers/firmware/efi/libstub/*|\
arch/powerpc/kernel/prom_init.o|\
- *.*.o)
+ *[^.].[^.]*.o|\
+ .*[0-9].o)
break
;;
*.o)
--
1.8.3.1
_______________________________________________
kpatch mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/kpatch