summaryrefslogtreecommitdiffstats
path: root/share/mklocale/Makefile
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2001-05-13 07:44:14 +0000
committerbde <bde@FreeBSD.org>2001-05-13 07:44:14 +0000
commit84c70c2dfbb641f5c12892b666b5515c6b4428c7 (patch)
tree1bc0846b8ca171fcf229b40964a09700c5c37900 /share/mklocale/Makefile
parent60ce9e40c2502cf08647b968104392bf1eb6f779 (diff)
downloadFreeBSD-src-84c70c2dfbb641f5c12892b666b5515c6b4428c7.zip
FreeBSD-src-84c70c2dfbb641f5c12892b666b5515c6b4428c7.tar.gz
Use a critical region to protect pushing of the parent's npx state to the
pcb for fork(). It was possible for the state to be saved twice when an interrupt handler saved it concurrently. This corrupted (reset) the state because fnsave has the (in)convenient side effect of doing an implicit fninit. Mundane null pointer bugs were not possible, because we save to an "arbitrary" process's pcb and not to the "right" place (npxproc). Push the parent's %gs to the pcb for fork(). Changes to %gs before fork() were not preserved in the child unless an accidental context switch did the pushing. Updated the list of pcb contents which is supposed to inhibit bugs like this. pcb_dr*, pcb_gs and pcb_ext were missing. Copying is correct for pcb_dr*, and pcb_ext is already handled specially (although XXX'ly). Reducing the savectx() call to an npxsave() call in rev.1.80 was a mistake. The above bugs are duplicated in many places, including in savectx() itself. The arbitraryness of the parent process pointer for the fork() subroutines, the pcb pointer for savectx(), and the save87 pointer for npxsave(), is illusory. These functions don't work "right" unless the pointers are precisely curproc, curpcb, and the address of npxproc's save87 area, respectively, although the special context in which they are called allows savectx(&dumppcb) to sort of work and npxsave(&dummy) to work. cpu_fork() just doesn't work unless the parent process pointer is curproc, or the caller has pushed %gs to the pcb, or %gs happens to already be in the pcb.
Diffstat (limited to 'share/mklocale/Makefile')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud