Closed lilianli2020 closed 1 year ago
It's wired that only the fs/proc/meminfo.c is changed, but the rmpiggy is marked as changed objs. I also tried this code patch in centos 7, it didn't include the rmpiggy.o objs. Not sure why is the difference, could the expert explain the root cause?
I can repro with a newer Ubuntu 3.13.0-xyz-generic kernel:
% uname -r
3.13.0-119-generic
% kpatch-build --skip-cleanup -t vmlinux my.patch
...
/usr/local/libexec/kpatch/create-diff-object: ERROR: rmpiggy.o: main: 2503: FILE symbol not found in base. Stripped?
...
% sum orig/arch/x86/realmode/rmpiggy.o \
patched/arch/x86/realmode/rmpiggy.o
64359 26 orig/arch/x86/realmode/rmpiggy.o
64359 26 patched/arch/x86/realmode/rmpiggy.o
I haven't spent the time to figure out why its rebuilding, but since it's an assembly file, we can't patch it anyway. Perhaps we add rmpiggy.o
to the kpatch-gcc
ignore list?
@joe-lawrence Thanks so much for the quick response. I've tried to add the rmpiggy.o into the ignore list, though the kpatch-build succeeds, the kpatch can't load the module with the error "insmod: ERROR: could not insert module kpatch-my.ko: Unknown symbol in module".
I compare the kpatch-build process in the centos and ubuntu, I find that when building the new vmlinux with the new patch, there are different module built in the centos and ubuntu, only in the ubuntu the rmpiggy.o is built. So I'm wondering whether there is some issue in the build process.
@lilyatlenovo - I saw that insmod error too, but ran out of time to fully debug. I think the issue is that the Ubuntu 3.13.0-xyz-generic kernels are pre-livepatch, so it needs the kpatch code. The symbol in question is kobj_sysfs_ops
in kmod/patch/kpatch-patch-hook.c and those older Ubuntu kernels aren't exporting the symbol. I'm out of the office the rest of the week, but can take a closer look next week.
As for rmpiggy.o, I don't really understand why it's rebuilding in the Ubuntu cfg but not the others. I think this behavior might be specific to Ubuntu 3.13.0-xyz-generic kernels as I don't think we ever saw that problem with the newer 4.4 based linux-generic-lts-xenial counterparts.
@lilyatlenovo - FYI opened #709 to track the unknown symbol error
Old issue that hasn't re-appeared from in other Ubuntu user reports, closing.
JL edit: wrap terminal output in code block for readability