]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Load the new sp_el0 with interrupts disabled in fork_trampoline. If an
authorAndrew Turner <andrew@FreeBSD.org>
Wed, 15 Feb 2017 14:56:47 +0000 (14:56 +0000)
committerAndrew Turner <andrew@FreeBSD.org>
Wed, 15 Feb 2017 14:56:47 +0000 (14:56 +0000)
commit783b367605365687ea865468579ce9a41e451d17
treefee516cb0d3bb8ff1380be8ed96547dc8aaeef71
parentf33f887e94d07861d267c2733bd26beebadfd227
Load the new sp_el0 with interrupts disabled in fork_trampoline. If an
interrupt arrives in fork_trampoline after sp_el0 was written we may then
switch to a new thread, enter userland so change this stack pointer, then
return to this code with the wrong value. This fixes this case by moving
the load of sp_el0 until after interrupts have been disabled.

Reported by: Mark Millard (markmi@dsl-only.net)
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D9593
sys/arm64/arm64/swtch.S