mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
amd64: initialize td_frame stack area for init(8) main thread
Unitialized td_frame mostly does not matter since all registers are overwritten on exec to activate init(8). Except PSL_T bit from the %rflags which might leak into fresh init as garbage, causing spurious SIGTRAPs delivered to init until first syscall is executed. Reviewed by: emaste, jhb, jhibbits Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44498
This commit is contained in:
parent
960d151eaa
commit
e0c92dd2b7
@ -784,6 +784,7 @@ start_init(void *dummy)
|
||||
*/
|
||||
KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0,
|
||||
("nested execve"));
|
||||
memset(td->td_frame, 0, sizeof(*td->td_frame));
|
||||
oldvmspace = p->p_vmspace;
|
||||
error = kern_execve(td, &args, NULL, oldvmspace);
|
||||
KASSERT(error != 0,
|
||||
|
Loading…
Reference in New Issue
Block a user