OSDN Git Service

ARM: spectre-v1: fix syscall entry
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 8 Nov 2019 12:35:33 +0000 (13:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2019 10:21:28 +0000 (11:21 +0100)
commite4f30ae336f67f32dbd12072039654dc46e6f1a7
tree625868056757f56e6a7f7e1ac89983336308c5b7
parent36250826443658d511639a9b94afae6af864c08d
ARM: spectre-v1: fix syscall entry

Commit 10573ae547c85b2c61417ff1a106cffbfceada35 upstream.

Prevent speculation at the syscall table decoding by clamping the index
used to zero on invalid system call numbers, and using the csdb
speculative barrier.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David A. Long <dave.long@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-header.S