-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create-diff-object: check NOP-padded instruction when symbol missing #1374
Conversation
commit 3e54c63 has added support for x86 NOP-padded functions. However, it works only when pfx symbol exists. In fedora 39 with kernel 6.7.4-200.fc39.x86_64. I met the following error: kpatch_bundle_symbols: 251: symbol uptime_proc_show at offset 16 within section .text.uptime_proc_show, expected 0. Problem here is, the symbol table of uptime.o has no __pfx symbol. To solve this problem, we can add a check if the padding area is filled with nop instructions. Signed-off-by: Longjun Luo <[email protected]>
Hi guys, I met a problem when I used the kpatch. About environment information:
The build log:
My patch file:
My kpatch command:
|
Here is the symbol table of uptime.o:
The problem here is the symbol table doesn't have __pfx symbol, so commit 3e54c63 can't handle it. |
Thanks for the patch! This is similar to an issue we've discused in #1320. Currently kpatch-build doesn't support running on a .o file that hasn't yet been processed by objtool. That can happen for certain config options (IBT, LTO) for which objtool runs at link time, on vmlinux.o, instead of on each individual translation unit. I'm working on a complete solution to this now. |
This PR has been open for 60 days with no activity and no assignee. It will be closed in 7 days unless a comment is added. |
This PR was closed because it was inactive for 7 days after being marked stale. |
commit 3e54c63 has added support for x86 NOP-padded functions.
However, it works only when pfx symbol exists.
In fedora 39 with kernel 6.7.4-200.fc39.x86_64.
I met the following error:
kpatch_bundle_symbols: 251: symbol uptime_proc_show at offset 16 within section .text.uptime_proc_show, expected 0.
Problem here is, the symbol table of uptime.o has no __pfx symbol.
To solve this problem, we can add a check if the padding area is filled with nop instructions.