summaryrefslogtreecommitdiff
path: root/arch/arm64/lib/uaccess_flushcache.c
diff options
context:
space:
mode:
authorPavel Tatashin <pasha.tatashin@soleen.com>2019-11-20 20:07:40 +0300
committerWill Deacon <will@kernel.org>2019-11-20 21:51:54 +0300
commite50be648aaa3da196d4f4ed49d1c5d4ec105fa4a (patch)
tree9c173b83fa66c80fb84c5dfa4738e39372011fb7 /arch/arm64/lib/uaccess_flushcache.c
parent94bb804e1e6f0a9a77acf20d7c70ea141c6c821e (diff)
downloadlinux-e50be648aaa3da196d4f4ed49d1c5d4ec105fa4a.tar.xz
arm64: uaccess: Remove uaccess_*_not_uao asm macros
It is safer and simpler to drop the uaccess assembly macros in favour of inline C functions. Although this bloats the Image size slightly, it aligns our user copy routines with '{get,put}_user()' and generally makes the code a lot easier to reason about. Cc: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> [will: tweaked commit message and changed temporary variable names] Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/lib/uaccess_flushcache.c')
-rw-r--r--arch/arm64/lib/uaccess_flushcache.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/lib/uaccess_flushcache.c b/arch/arm64/lib/uaccess_flushcache.c
index cbfcbe6470a5..bfa30b75b2b8 100644
--- a/arch/arm64/lib/uaccess_flushcache.c
+++ b/arch/arm64/lib/uaccess_flushcache.c
@@ -28,7 +28,11 @@ void memcpy_page_flushcache(char *to, struct page *page, size_t offset,
unsigned long __copy_user_flushcache(void *to, const void __user *from,
unsigned long n)
{
- unsigned long rc = __arch_copy_from_user(to, from, n);
+ unsigned long rc;
+
+ uaccess_enable_not_uao();
+ rc = __arch_copy_from_user(to, from, n);
+ uaccess_disable_not_uao();
/* See above */
__clean_dcache_area_pop(to, n - rc);