ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization
authorJulien Thierry <julien.thierry@arm.com>
Thu, 14 Feb 2019 02:10:13 +0000 (21:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:20:46 +0000 (10:20 +0100)
commitd5e5018179eada4f3d95d11fdfa1c9bd14595f0b
tree2a4bae23a1be371d637c7f40ba7cb116d49622a2
parent0d24778382b8c39e3af2d9a7a87e0f38438b7216
ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization

Commit afaf6838f4bc896a711180b702b388b8cfa638fc upstream.

Introduce C and asm helpers to sanitize user address, taking the
address range they target into account.

Use asm helper for existing sanitization in __copy_from_user().

Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David A. Long <dave.long@linaro.org>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/include/asm/assembler.h
arch/arm/include/asm/uaccess.h
arch/arm/lib/copy_from_user.S