arm64: futex: Mask __user pointers prior to dereference
authorWill Deacon <will.deacon@arm.com>
Mon, 5 Feb 2018 15:34:24 +0000 (15:34 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:23 +0000 (18:46 +0800)
commit702204d84630098c994b24dcdaf8b41eed7633bd
tree250a368e6a41bad75920c9beb658d5cac5d2275a
parent92856edfa55ecd042fa22d61e50dfc3e6427a800
arm64: futex: Mask __user pointers prior to dereference

commit 91b2d3442f6a upstream.

The arm64 futex code has some explicit dereferencing of user pointers
where performing atomic operations in response to a futex command. This
patch uses masking to limit any speculative futex operations to within
the user address space.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
change on old futex_atomic_op_inuser function instead of
arch_futex_atomic_op_inuser in arch/arm64/include/asm/futex.h
arch/arm64/include/asm/futex.h