]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 9 Mar 2022 18:50:56 +0000 (15:50 -0300)
commit872e7cf403ecbf812dfa53f29b1a49b54fc32fcd
tree8d9aada516b21c1c6d53477465a67e51d0fc87da
parent365fc409c013153e0a1524a5d4d87426cf160fda
arm64: entry: Allow tramp_alias to access symbols after the 4K boundary

commit 6c5bf79b69f911560fbf82214c0971af6e58e682 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CVE-2022-23960
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/arm64/kernel/entry.S