ARM: spectre-v1: fix syscall entry
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 15 Oct 2018 15:32:12 +0000 (11:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:27 +0000 (09:16 +0200)
commitb690ec0dc735545bca2b78bee639d1545bda97e6
treecb6e77dc66073faf08ee69426af41f5acd55a870
parent4186f7cfa1d6083e969638c8e98b205163da7e2a
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