svn commit: r347133 - head/sys/arm64/arm64

Konstantin Belousov kib at FreeBSD.org
Sat May 4 19:40:32 UTC 2019


Author: kib
Date: Sat May  4 19:40:30 2019
New Revision: 347133
URL: https://svnweb.freebsd.org/changeset/base/347133

Log:
  arm64: Properly restore PAN when done with userspace access in casueword.
  
  Approved by:	andrew
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/arm64/arm64/support.S

Modified: head/sys/arm64/arm64/support.S
==============================================================================
--- head/sys/arm64/arm64/support.S	Sat May  4 19:05:30 2019	(r347132)
+++ head/sys/arm64/arm64/support.S	Sat May  4 19:40:30 2019	(r347133)
@@ -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 */
@@ -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 */


More information about the svn-src-all mailing list