Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-5] src/sys/arch/i386/i386



Module Name:    src
Committed By:   snj
Date:           Thu May 20 05:51:59 UTC 2010

Modified Files:
        src/sys/arch/i386/i386 [netbsd-5]: trap.c vector.S

Log Message:
Pull up following revision(s) (requested by riz in ticket #1401):
        sys/arch/i386/i386/trap.c: revisions 1.251-1.253 via patch
        sys/arch/i386/i386/vector.S: revisions 1.50-1.51 via patch
If we fault on the 'iret' during return to userpace (eg if %eip is outside
the bounds of %cs) then hack the stack to contain a normal fault frame
for the signal setup code (etc).
Previously the code assumed that the original user trap frame was still
present - at it is for faults when loading the segment registers.
--
If we fault on the iret during return to userspace, see if we need to
do a lazy update of %cs to make the stack executable.
If a change is made, just retry the failing sequence.
Signal handlers as gcc nested local functions now work!
--
Fix 'fault on load of %gs during retirn to userspace' to look for the
 correct instruction bytes.
Take the 'fault on load segment register' through the same path as 'fault
 on iret' so we don't have to fixup the broken stackframe that contains a
 mix of user and kernel registers,
Update comments about how the faults during return to userspace are processed.
Setting an invalid %gs in the saved context of a signal handler causes
 a SIGSEGV handler to be entered with what look like valid registers.


To generate a diff of this commit:
cvs rdiff -u -r1.241.4.1 -r1.241.4.2 src/sys/arch/i386/i386/trap.c
cvs rdiff -u -r1.42.6.2 -r1.42.6.3 src/sys/arch/i386/i386/vector.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index