Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137968255
D9593.id25164.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
787 B
Referenced Files
None
Subscribers
None
D9593.id25164.diff
View Options
Index: sys/arm64/arm64/swtch.S
===================================================================
--- sys/arm64/arm64/swtch.S
+++ sys/arm64/arm64/swtch.S
@@ -241,11 +241,6 @@
mov fp, #0 /* Stack traceback stops here. */
bl _C_LABEL(fork_exit)
- /* Restore sp and lr */
- ldp x0, x1, [sp]
- msr sp_el0, x0
- mov lr, x1
-
/* Restore the registers other than x0 and x1 */
ldp x2, x3, [sp, #TF_X + 2 * 8]
ldp x4, x5, [sp, #TF_X + 4 * 8]
@@ -265,10 +260,15 @@
/*
* Disable interrupts to avoid
- * overwriting spsr_el1 by an IRQ exception.
+ * overwriting spsr_el1 and sp_el0 by an IRQ exception.
*/
msr daifset, #2
+ /* Restore sp and lr */
+ ldp x0, x1, [sp]
+ msr sp_el0, x0
+ mov lr, x1
+
/* Restore elr and spsr */
ldp x0, x1, [sp, #16]
msr elr_el1, x0
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 6:37 PM (8 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26295177
Default Alt Text
D9593.id25164.diff (787 B)
Attached To
Mode
D9593: Load the new sp_el0 with interrupts disabled in fork_trampoline
Attached
Detach File
Event Timeline
Log In to Comment