https://github.com/torvalds/linux
Revision 2d49b721dc18c113d5221f4cf5a6104eb66cb7f2 authored by Peter Zijlstra on 10 June 2021, 07:04:29 UTC, committed by Peter Zijlstra on 11 June 2021, 06:53:06 UTC
It turns out that the compilers generate conditional branches to the
retpoline thunks like:

  5d5:   0f 85 00 00 00 00       jne    5db <cpuidle_reflect+0x22>
	5d7: R_X86_64_PLT32     __x86_indirect_thunk_r11-0x4

while the rewrite can only handle JMP/CALL to the thunks. The result
is the alternative wrecking the code. Make sure to skip writing the
alternatives for conditional branches.

Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls")
Reported-by: Lukasz Majczak <lma@semihalf.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
1 parent 584fd3b
History
Tip revision: 2d49b721dc18c113d5221f4cf5a6104eb66cb7f2 authored by Peter Zijlstra on 10 June 2021, 07:04:29 UTC
objtool: Only rewrite unconditional retpoline thunk calls
Tip revision: 2d49b72
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.4 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.9 KB
.mailmap -rw-r--r-- 19.5 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 98.6 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 588.3 KB
Makefile -rw-r--r-- 64.3 KB
README -rw-r--r-- 727 bytes

README

back to top