Skip to content

Commit

Permalink
MFC r347133:
Browse files Browse the repository at this point in the history
arm64: Properly restore PAN when done with userspace access in casueword.
  • Loading branch information
kostikbel committed May 11, 2019
1 parent 0775f68 commit e939702
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sys/arm64/arm64/support.S
Expand Up @@ -64,8 +64,8 @@ ENTRY(casueword32)
b.ne 2f /* Not equal, exit */
stxr w5, w3, [x0] /* Store the new data */
cbnz w5, 1b /* Retry on failure */
EXIT_USER_ACCESS(w6)
2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */
2: EXIT_USER_ACCESS(w6)
SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */
str w4, [x2] /* Store the read data */
mov x0, #0 /* Success */
ret /* Return */
Expand All @@ -86,8 +86,8 @@ ENTRY(casueword)
b.ne 2f /* Not equal, exit */
stxr w5, x3, [x0] /* Store the new data */
cbnz w5, 1b /* Retry on failure */
EXIT_USER_ACCESS(w6)
2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */
2: EXIT_USER_ACCESS(w6)
SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */
str x4, [x2] /* Store the read data */
mov x0, #0 /* Success */
ret /* Return */
Expand Down

0 comments on commit e939702

Please sign in to comment.