]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
arm64: ssbd: Skip apply_ssbd if not using dynamic mitigation
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 20 Jul 2018 09:53:05 +0000 (10:53 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 5 Sep 2018 12:53:31 +0000 (14:53 +0200)
commit4a103911c29f19884a1c0f3dde37fe7ebc5de469
tree7279c46accf41ae11f9af5307a524f0998d35fc2
parent334a9f7c818c97d8c467d752494e080fcd113c94
arm64: ssbd: Skip apply_ssbd if not using dynamic mitigation

BugLink: https://bugs.launchpad.net/bugs/1787993
CVE-2018-3639 (arm64)

commit 986372c4367f46b34a3c0f6918d7fb95cbdf39d6 upstream.

In order to avoid checking arm64_ssbd_callback_required on each
kernel entry/exit even if no mitigation is required, let's
add yet another alternative that by default jumps over the mitigation,
and that gets nop'ed out if we're doing dynamic mitigation.

Think of it as a poor man's static key...

Reviewed-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 02e26bd9ad58197533a7d5fcd62f975891a9e936
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git /
linux-4.14.y)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/entry.S