Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/amd64/amd64/vm_machdep.c | ||
---|---|---|
189 | Should we clear PCB_KERNFPU_THR, or leave it alone? |
sys/amd64/amd64/vm_machdep.c | ||
---|---|---|
189 | To get clean state we should probably clear it as well. That's probably a (small) bug that we don't clear it now. | |
601 | We could perhaps assert that neither KERNFPU nor KERNFPU_THR is set here instead of clearing. No user process calling thr_new() should have active kernel FPU state here. cpu_fork() doesn't currently bother clearing this flag (so I didn't add it), but I would like these two code blocks to be as identical as possible between cpu_fork() and cpu_copy_thread(). (It's somewhat temping to see if I could come up with some kind of 'copy_pcb' function for the shared logic between the two functions.) | |
609 | This comment seems a bit stale as it doesn't create a stack at all. For exec_setregs where I think this was copied from, we bzero the trap frame before setting registers. I wonder if for the trapframe cpu_thread_copy() shouldn't be more like exec and rely on cpu_set_upcall() instead. |
sys/amd64/amd64/vm_machdep.c | ||
---|---|---|
609 |
I tried doing a bzero here and it didn't work out well. cpu_set_upcall() below doesn't set tf_ss (though it sets all the others) which blew up. The 32-bit cpu_set_upcall() doesn't set any seg regs at all, and linux_set_upcall_kse() assumes a copy instead of clear. I will make the comment more accurate though. |