Date: Sat, 23 Nov 2002 22:50:38 +0000 From: Doug Rabson <dfr@nlsystems.com> To: Marcel Moolenaar <marcel@freebsd.org>, Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 21417 for review Message-ID: <200211232250.38412.dfr@nlsystems.com> In-Reply-To: <200211232017.gANKHAAk090869@repoman.freebsd.org> References: <200211232017.gANKHAAk090869@repoman.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Saturday 23 November 2002 8:17 pm, Marcel Moolenaar wrote: > http://perforce.freebsd.org/chv.cgi?CH=21417 > > Change 21417 by marcel@marcel_nfs on 2002/11/23 12:17:09 > > Raw, untested implementation of EPC syscalls. This seems to be missing the bit after calling syscall() which checks for a full exception_restore, e.g. after an execve and also the check for calling ast(), e.g. after a signal. On the subject of ast(), I'm sure that the current code in exception_restore which tests for this is wrong. It needs to call ast() very carefully to ensure that a call is not missed. The algorithm is something like: loop: savepsr = psr; disable_interrupts() if (astpending || needresched) { psr = savepsr(); ast(); goto loop; } /* * Note: interrupts are disabled here which prevents any * further ast's. */ ... restore registers and back to user mode ... The bundle which contains the call to ast() also contains the branch instruction for the loop. This can't be right because the call will return to the bundle *after* the one containing the loop branch. It is very important interrupts are not re-enabled after testing astpending and needresched until the rfi (or br.ret) to make this section atomic. The same rule applies to do_syscall and epc_syscall. One other thing after re-familiarising myself with exception.s. You have added unwind records to all the kernel IVT entry points. This is quite unhelpful when trying to debug kernel faults. The previous version which manually unwound past the exception to the code which faulted was extremely useful and saved me a lot of time in debugging. Can we have it back please :-). -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the messagehelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211232250.38412.dfr>
