|
From: Bodo S. <bst...@fu...> - 2004-10-29 14:44:43
|
As promised, here are the next test tools. interrupted_syscall.c checks, whether syscall restarting is correctly done for - nanosleep(), which returns -ERESTART_RESTARTBLOCK on interruption - read(), which returns -ERESTARTSYS on interruption. - sigsuspend(), which does do_signal() while being in the syscall and/or on return to user. The test sets SIG_IGN or a signal handler (nanosleep, read) and it tests with and without SA_RESTART (read). And it does the test twice, once the test running normal, and one with the test being PTRACE_SYSCALL'ed. At least for SIG_IGN, this makes a difference. kernel_restorer.c uses a directly coded call to sys_rt_sigaction(). By this way, it can force the kernel to use it's own restorer-stub (For UML at the moment, this is the code on the stack). It does this for both possible stack-layouts / restorers. A further test done by this tool is the exploit for sigreturn() doing a wrong systemcall restart handling. This case is done for sigreturn() and rt_sigreturn() Bodo |