ARM: spectre-v1: add array_index_mask_nospec() implementation
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 15 Oct 2018 15:32:11 +0000 (11:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:27 +0000 (09:16 +0200)
commit4186f7cfa1d6083e969638c8e98b205163da7e2a
tree8b02ca522fd39313bce3c284091a3d3b3f06eeec
parentf6909113ad1ff2a168643e7fee3136b8adbb4aa9
ARM: spectre-v1: add array_index_mask_nospec() implementation

Commit 1d4238c56f9816ce0f9c8dbe42d7f2ad81cb6613 upstream.

Add an implementation of the array_index_mask_nospec() function for
mitigating Spectre variant 1 throughout the kernel.

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/include/asm/barrier.h