]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: entry: Add macro for reading symbol addresses from the trampoline
authorJames Morse <james.morse@arm.com>
Thu, 31 Mar 2022 18:33:53 +0000 (19:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Apr 2022 10:41:10 +0000 (12:41 +0200)
commit1291f9f7eb8ad19652e64869f66ba60f9f3e0ec4
tree90623a6e571676b74f7d94337494d2942aa10426
parent6932c82566e23aca000a60fd2d6e80c04140d119
arm64: entry: Add macro for reading symbol addresses from the trampoline

commit b28a8eebe81c186fdb1a0078263b30576c8e1f42 upstream.

The trampoline code needs to use the address of symbols in the wider
kernel, e.g. vectors. PC-relative addressing wouldn't work as the
trampoline code doesn't run at the address the linker expected.

tramp_ventry uses a literal pool, unless CONFIG_RANDOMIZE_BASE is
set, in which case it uses the data page as a literal pool because
the data page can be unmapped when running in user-space, which is
required for CPUs vulnerable to meltdown.

Pull this logic out as a macro, instead of adding a third copy
of it.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[ Removed SDEI for stable backport ]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/entry.S