]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: spectre-v1: use get_user() for __get_user()
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 9 Jul 2018 09:28:12 +0000 (10:28 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 2 Aug 2018 16:41:38 +0000 (17:41 +0100)
commit4f2e8ce57655aea3f73fa342d8ebccf1793fe25c
treed97f31f577fde389b410224139b342e9538c2cc5
parent36dfc79710a5a264dd51e673220fd7f9918201c9
ARM: spectre-v1: use get_user() for __get_user()

Fixing __get_user() for spectre variant 1 is not sane: we would have to
add address space bounds checking in order to validate that the location
should be accessed, and then zero the address if found to be invalid.

Since __get_user() is supposed to avoid the bounds check, and this is
exactly what get_user() does, there's no point having two different
implementations that are doing the same thing.  So, when the Spectre
workarounds are required, make __get_user() an alias of get_user().

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/uaccess.h