From 3d839d4bc3ced2b603795b9035c5e316e16347c6 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 14 Oct 2020 15:31:42 +0000 Subject: [PATCH] Remove direct user access from the arm64 copyinstr These already use the load variant that simulates userspace access. Remove the macros that enable normal loads and stores from userspace as they are unneeded. Sponsored by: Innovate UK --- sys/arm64/arm64/copyinout.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/arm64/arm64/copyinout.S b/sys/arm64/arm64/copyinout.S index 5c523d11ed00..9077397ec8f8 100644 --- a/sys/arm64/arm64/copyinout.S +++ b/sys/arm64/arm64/copyinout.S @@ -100,7 +100,6 @@ ENTRY(copyinstr) adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ - ENTER_USER_ACCESS(w6, x7) ldr x7, =VM_MAXUSER_ADDRESS 1: cmp x0, x7 @@ -113,8 +112,7 @@ ENTRY(copyinstr) sub x2, x2, #1 /* len-- */ cbnz x2, 1b -2: EXIT_USER_ACCESS(w6) - SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ +2: SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ 3: cbz x3, 4f /* Check if done != NULL */