arm64: uaccess: Mask __user pointers for __arch_{clear, copy_*}_user
authorWill Deacon <will.deacon@arm.com>
Fri, 23 Feb 2018 12:29:00 +0000 (20:29 +0800)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:22 +0000 (18:46 +0800)
commit92856edfa55ecd042fa22d61e50dfc3e6427a800
tree6ac807ac8c5428550ecccae9b6ef6c3ca96ddfc5
parent0de9e9c895a4ae48fa972747e75323d8ed25d167
arm64: uaccess: Mask __user pointers for __arch_{clear, copy_*}_user

Rewritting from commit f71c2ffcb20d upstream. On LTS 4.9, there has no
raw_copy_from/to_user, neither __copy_user_flushcache, and it isn't good
idead to pick up them. The following is origin commit log, that's also
applicable for the new patch.

    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>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/include/asm/uaccess.h