ARM: spectre-v1: fix syscall entry
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 7 Nov 2018 16:43:56 +0000 (11:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Nov 2018 07:20:39 +0000 (08:20 +0100)
commit49b853905b9afc4a6898ce37f4be8721273badc3
treecc3578e71a6f0a2e4252181ea4b70214047392a2
parent8a4ae2876f6c03e3def6fb1d438cc5f01932cdc1
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>
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-header.S