summaryrefslogtreecommitdiff
path: root/arch/arm64/lib/clear_user.S
diff options
context:
space:
mode:
authorPavel Tatashin <pasha.tatashin@soleen.com>2019-11-20 12:07:40 -0500
committerWill Deacon <will@kernel.org>2019-11-20 18:51:54 +0000
commite50be648aaa3da196d4f4ed49d1c5d4ec105fa4a (patch)
tree9c173b83fa66c80fb84c5dfa4738e39372011fb7 /arch/arm64/lib/clear_user.S
parent94bb804e1e6f0a9a77acf20d7c70ea141c6c821e (diff)
downloadlwn-e50be648aaa3da196d4f4ed49d1c5d4ec105fa4a.tar.gz
lwn-e50be648aaa3da196d4f4ed49d1c5d4ec105fa4a.zip
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/clear_user.S')
-rw-r--r--arch/arm64/lib/clear_user.S3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm64/lib/clear_user.S b/arch/arm64/lib/clear_user.S
index 322b55664cca..aeafc03e961a 100644
--- a/arch/arm64/lib/clear_user.S
+++ b/arch/arm64/lib/clear_user.S
@@ -20,7 +20,6 @@
* Alignment fixed up by hardware.
*/
ENTRY(__arch_clear_user)
- uaccess_enable_not_uao x2, x3, x4
mov x2, x1 // save the size for fixup return
subs x1, x1, #8
b.mi 2f
@@ -40,7 +39,6 @@ uao_user_alternative 9f, strh, sttrh, wzr, x0, 2
b.mi 5f
uao_user_alternative 9f, strb, sttrb, wzr, x0, 0
5: mov x0, #0
- uaccess_disable_not_uao x2, x3
ret
ENDPROC(__arch_clear_user)
EXPORT_SYMBOL(__arch_clear_user)
@@ -48,6 +46,5 @@ EXPORT_SYMBOL(__arch_clear_user)
.section .fixup,"ax"
.align 2
9: mov x0, x2 // return the original size
- uaccess_disable_not_uao x2, x3
ret
.previous