|
From: Bodo S. <bst...@fu...> - 2004-10-29 01:19:29
|
Blaisorblade wrote: > No. Just strace any process inside UML. Let's "strace ls". Last time I > checked, it does not work. Oh hell! It works (as of 2.6.9)! Well, you already > fixed that. > No. Here you are wrong. The problem is still there (or is it again there?). Sorry. My latest patch "patch-singlestep-sighdlr" has been too complete! Setting TIF_SIGPENDING after ptrace_notify() in syscall_trace() in neccessary only on the 2nd tracepoint (entryexit == 1). And setting it on the 1st tracepoint lets some specific systemcalls loop. Example: sys_rt_sigaction() wants to be called without SIGPENDING. Thus it returns with -ERESTARTNOINTR. On return do_signal() is called, which resets TIF_SIGPENDING and sets EIP back to the syscall. Now the syscall starts, runs through syscall_trace() and TIF_SIGPENDING is set again. Now it returns with -ERESTARTNOINTR ... ... Here's the patch: --- --- a/arch/um/kernel/ptrace.c 2004-10-29 02:27:42.000000000 +0200 +++ b/arch/um/kernel/ptrace.c 2004-10-29 02:28:24.000000000 +0200 @@ -330,7 +330,8 @@ void syscall_trace(union uml_pt_regs *re between a syscall stop and SIGTRAP delivery */ ptrace_notify(SIGTRAP | (((current->ptrace & PT_TRACESYSGOOD) && !is_singlestep) ? SYSCALL_TRAP : 0)); - set_thread_flag(TIF_SIGPENDING); /* force do_signal() --> is_syscall() */ + if ( entryexit ) /* force do_signal() --> is_syscall() */ + set_thread_flag(TIF_SIGPENDING); /* * this isn't the same as continuing with a signal, but it will do |