-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kpatch-build: account for __pfx_-less NOP padding
Some kernel configurations generate function NOP padding, but without associated __pfx_<function> symbols. For example: $ git describe HEAD v6.4-rc7-72-gdad9774deaf1 # Initial default config turns on Indirect Branch Tracking and 16-NOP padding bytes $ make defconfig $ grep -e CONFIG_X86_KERNEL_IBT -e CONFIG_FUNCTION_PADDING_BYTES .config CONFIG_X86_KERNEL_IBT=y CONFIG_FUNCTION_PADDING_BYTES=16 # Test .o build generates 16 bytes of NOPs but no "__pfx_" symbol $ make -j$(nproc) fs/proc/cmdline.o $ objdump -Dr -j .text fs/proc/cmdline.o | grep -e '<.*>:' -e 'Disassembly' Disassembly of section .text: 0000000000000000 <cmdline_proc_show-0x10>: 0000000000000010 <cmdline_proc_show>: This is because objtool operation on the object code may be delayed under certain configurations. As such, create-diff-object should be prepared to encounter NOP padded functions in object files before any __pfx_ symbols are created. Fixes: 3e54c63 ("create-diff-object: support x86 NOP-padded functions") Closes: #1347 ("x86 NOP padded functions without __pfx_ symbol") Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
- Loading branch information
1 parent
f8d2534
commit 419f7c2
Showing
2 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters