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") Reported-by: Ryan Sullivan <[email protected]> Signed-off-by: Joe Lawrence <[email protected]>
- Loading branch information