Re: i386 page fault clobbers error code in trap frame

2006-07-30 Thread Tijl Coosemans
On Saturday 29 July 2006 21:57, Kip Macy wrote: Looking at siginfo it isn't clear that there is a right way to provide SIGSEGV, eva, and the error code. _fault._trapno should contain the machine's error code and si_signo should contain SIGSEGV, and si_addr contains the faulting pc. Maybe one

Re: i386 page fault clobbers error code in trap frame

2006-07-30 Thread Kip Macy
si_addr doesn't contain the faulting pc, it contains the address that So either the comment is wrong, or that is a technically incorrect kludge. However, given that a number of the other fields are not filled out at all, the real objective should be to keep applications working. ---

Re: i386 page fault clobbers error code in trap frame

2006-07-30 Thread Tijl Coosemans
On Sunday 30 July 2006 21:30, Kip Macy wrote: si_addr doesn't contain the faulting pc, it contains the address that So either the comment is wrong, or that is a technically incorrect kludge. However, given that a number of the other fields are not filled out at all, the real objective

i386 page fault clobbers error code in trap frame

2006-07-29 Thread Tijl Coosemans
I'm refering to the following two lines in sys/i386/i386/trap.c /* kludge to pass faulting virtual address to sendsig */ frame-tf_err = eva; Isn't there some other way to do this? Wouldn't the address still be available in %cr2 inside sendsig? Or could there have been other page faults by

Re: i386 page fault clobbers error code in trap frame

2006-07-29 Thread Kip Macy
Looking at siginfo it isn't clear that there is a right way to provide SIGSEGV, eva, and the error code. _fault._trapno should contain the machine's error code and si_signo should contain SIGSEGV, and si_addr contains the faulting pc. Maybe one could abuse si_code to contain eva. Sorry for