<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: ΢ÈíÑźÚ; color: rgb(0, 0, 0); line-height: 1.5; }body { font-size: 10.5pt; font-family: ΢ÈíÑźÚ; color: rgb(0, 0, 0); line-height: 1.5; }</style>
</head>
<body>
<div><span></span><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">When there are ".." in source object path then current kpatch-gcc can not handle it correctly:<br>
kpatch-gcc use the following logic to check the objects who got recompiled and would write the changed<br>
objects to "chagned_objs". But if the path of the input obj is something like"arch/x86/kvm/../../../virt/kvm/.tmp_kvm_main.o"<br>
then the following logic can not handle it properly, the kvm_main.o will fall into the "*.*.o" branch.<br>
And kpatch-build will end up with "ERROR: no changed objects found. Check /root/.kpatch/build.log for more details."<br>
<br>
kpatch/kpatch-build/kpatch-gcc:<br>
......<br>
case "$obj" in<br>
*.mod.o|\<br>
*built-in.o|\<br>
vmlinux.o|\<br>
.tmp_kallsyms1.o|\<br>
.tmp_kallsyms2.o|\<br>
init/version.o|\<br>
arch/x86/boot/version.o|\<br>
arch/x86/boot/compressed/eboot.o|\<br>
arch/x86/boot/header.o|\<br>
arch/x86/boot/compressed/efi_stub_64.o|\<br>
arch/x86/boot/compressed/piggy.o|\<br>
kernel/system_certificates.o|\<br>
arch/x86/vdso/*|\<br>
arch/x86/entry/vdso/*|\<br>
drivers/firmware/efi/libstub/*|\<br>
arch/powerpc/kernel/prom_init.o|\<br>
*.*.o)<br>
break<br>
;;<br>
*.o)<br>
mkdir -p "$KPATCH_GCC_TEMPDIR/orig/$(dirname $obj)"<br>
[[ -e $obj ]] && cp -f "$obj" "$KPATCH_GCC_TEMPDIR/orig/$obj"<br>
echo "$obj" >> "$KPATCH_GCC_TEMPDIR/changed_objs"<br>
break<br>
;;<br>
*)<br>
break<br>
;;<br>
esac<br>
......<br>
<br>
Signed-off-by: chen xiaoguang <xiaoggchen@tencent.com><br>
</span></div>
<div><br>
</div>
<span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">---<br>
kpatch-build/kpatch-gcc | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/kpatch-build/kpatch-gcc b/kpatch-build/kpatch-gcc<br>
index e91f4b2..ffa9bc3 100755<br>
--- a/kpatch-build/kpatch-gcc<br>
+++ b/kpatch-build/kpatch-gcc<br>
@@ -38,7 +38,8 @@ if [[ "$TOOLCHAINCMD" = "gcc" ]] ; then<br>
arch/x86/entry/vdso/*|\<br>
drivers/firmware/efi/libstub/*|\<br>
arch/powerpc/kernel/prom_init.o|\<br>
- *.*.o)<br>
+ *[^.].[^.]*.o|\<br>
+ .*[0-9].o)<br>
break<br>
;;<br>
*.o)<br>
--<br>
1.8.3.1<br>
</span>
</body>
</html>