]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
authorJames Morse <james.morse@arm.com>
Wed, 24 Nov 2021 11:40:18 +0000 (11:40 +0000)
committerJames Morse <james.morse@arm.com>
Tue, 15 Feb 2022 17:39:34 +0000 (17:39 +0000)
commitfa48d4e57a237b6b0c446e5b1ecf85ec107bab9a
tree7e420e827f63f6d3386eff935579b00689e41613
parenta2e73682f4b6945dfbeff608f984dc0e1721a4b5
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary

Systems using kpti enter and exit the kernel through a trampoline mapping
that is always mapped, even when the kernel is not. tramp_valias is a macro
to find the address of a symbol in the trampoline mapping.

Adding extra sets of vectors will expand the size of the entry.tramp.text
section to beyond 4K. tramp_valias will be unable to generate addresses
for symbols beyond 4K as it uses the 12 bit immediate of the add
instruction.

As there are now two registers available when tramp_alias is called,
use the extra register to avoid the 4K limit of the 12 bit immediate.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
arch/arm64/kernel/entry.S