x86: Permit absolute per-CPU references in asm code
We have code in asm that is either part of a template that gets copied
around, or is in an alternative block that gets patched into a different
location in the binary.
This means we cannot use RIP-relative addressing here unless we fix up
the relative offset in the instruction after copying the code, which is
kind of tricky.
Instead, let's permit 32-bit sign extended per-CPU references, by
tracking their locations and targets, and doing a pass at boot to insert
the correct immediates.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
3 files changed