arm64: uaccess: Mask __user pointers for __arch_{clear, copy_*}_user
authorMark Rutland <mark.rutland@arm.com>
Thu, 12 Apr 2018 11:11:05 +0000 (12:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2018 06:20:43 +0000 (08:20 +0200)
commit4504c5ccef54070bdc09f26a7fcb41a3f053ded0
tree3b0f384c92d322231f66d59ee45c0f56f0b41137
parent4c03928fd68a710ec55b7a07a4e65d2f438a1256
arm64: uaccess: Mask __user pointers for __arch_{clear, copy_*}_user

From: Will Deacon <will.deacon@arm.com>

commit f71c2ffcb20dd8626880747557014bb9a61eb90e upstream.

Like we've done for get_user and put_user, ensure that user pointers
are masked before invoking the underlying __arch_{clear,copy_*}_user
operations.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[v4.9: fixup for v4.9-style uaccess primitives]
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/uaccess.h
arch/arm64/kernel/arm64ksyms.c
arch/arm64/lib/clear_user.S
arch/arm64/lib/copy_in_user.S