]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: entry: Make the kpti trampoline's kpti sequence optional
authorJames Morse <james.morse@arm.com>
Thu, 31 Mar 2022 18:33:49 +0000 (19:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Apr 2022 10:41:09 +0000 (12:41 +0200)
commit5542470001b7eaae3409899489f9919585b193c0
treedadf1a1403359ef5aaf73c3c99a825b7598a6259
parent10fbae210aaa77f506f7b853c027b3c47b3d137c
arm64: entry: Make the kpti trampoline's kpti sequence optional

commit c47e4d04ba0f1ea17353d85d45f611277507e07a upstream.

Spectre-BHB needs to add sequences to the vectors. Having one global
set of vectors is a problem for big/little systems where the sequence
is costly on cpus that are not vulnerable.

Making the vectors per-cpu in the style of KVM's bh_harden_hyp_vecs
requires the vectors to be generated by macros.

Make the kpti re-mapping of the kernel optional, so the macros can be
used without kpti.

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>
arch/arm64/kernel/entry.S