summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-02-08 20:10:52 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2023-05-10 15:47:08 +0300
commit270a69c4485d7d07516d058bcc0473c90ee22185 (patch)
treeb8f40326a00e414cc5a4cc7d7f768072bc669e38 /arch/x86/lib
parent6becb5026b8192e0ed6619d6e7793c2f1288244f (diff)
downloadlinux-270a69c4485d7d07516d058bcc0473c90ee22185.tar.xz
x86/alternative: Support relocations in alternatives
A little while ago someone (Kirill) ran into the whole 'alternatives don't do relocations nonsense' again and I got annoyed enough to actually look at the code. Since the whole alternative machinery already fully decodes the instructions it is simple enough to adjust immediates and displacement when needed. Specifically, the immediates for IP modifying instructions (JMP, CALL, Jcc) and the displacement for RIP-relative instructions. [ bp: Massage comment some more and get rid of third loop in apply_relocation(). ] Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230208171431.313857925@infradead.org
Diffstat (limited to 'arch/x86/lib')
0 files changed, 0 insertions, 0 deletions