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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:22:52 +0000 (20:22 +0100)
commitd9ef050f28953658ab1621a65c4090600e30bfde
tree6ff4bced2265e21b5d8ff5844216d93783d760aa
parentba32050d308a8bcd8ea300daf00dc197523d47f8
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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/futex.h