On 03/27, Petr Tesarik wrote:You misunderstood. I didn't claim this approach is right, but I think it is better if we desperately need to fix this problem. Yes the tracee can lost the right SIGTRAP, this is obvious. But this can happen with your patch as well, the kernel just can't know what should we do with SIGTRAP in ->exit_code. In short, I (roughly) meant ptrace_stop: ... // return path spin_lock_irq(->siglock); current->last_siginfo = NULL; // can be false positive if (!->ptrace && (->exit_code & 7f) == SIGTRAP) ->exit_code = 0; ... Yes, this is not right too. (and yes, ptrace_stop() is much better than do_syscall_trace() I suggested originally). Just curious: what is the bug report? Why do they want to SIGKILL strace? Once again: of course I agree it would be nice to fix the problem if we had a clean fix. Yes I think this problem is _relatively_ minor, and I don't really think it is BUG. But I am not maintainer or expert, just my personal opinion. I jumped into discussion only because I don't agree with the patch, not because I think we should not fix this. (btw, I think that maintainer has already give a good summary ;) SIGKILL can wake up the tracee, it could be TASK_RUNNING when the tracer plays with its flag, this is wrong. But there are other problems. It is racy because TASK_TRACED doesn't necessary mean the tracee sleeps in TASK_TRACED state, it is possible that the tracee is running and waits for tasklist_lock() in ptrace_stop. As a very minimum, we should clear PF_PTRACEORPHAN. More. Suppose that we set PF_PTRACEORPHAN, and then ptrace_untrace() changes TASK_TRACED to TASK_STOPPED. Another tracer attaches to the poor tracee, ptrace_check_attach() changes TASK_STOPPED to TASK_TRACED. When the new tracer wakes up the tracee, it will see PF_PTRACEORPHAN and clear ->exit_code. Oleg. --
| David Miller | [GIT]: Networking |
| Fred . | Please add ZFS support (from GPL sources) |
| Linus Torvalds | Linux 2.6.26-rc4 |
| Jan Engelhardt | Re: why does x86 "make defconfig" build a single, lonely module? |
git: | |
| Jörg Sommer | [PATCH 2/4] Rework redo_merge |
| Matthieu Moy | git push to a non-bare repository |
| Michael Dressel | git merge --no-commit <branch>; does commit |
| Joakim Tjernlund | [FEATURE REQUEST] git clone, just clone selected branches? |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Unix Fan | Re: Vulnerability Note VU#800113 - Multiple DNS implementations vulnerable to cach... |
| Ihar Hrachyshka | Re: That whole "Linux stealing our code" thing |
| Daniel Brewer | Re: fsync performance hit on 1.6.1 |
| YAMAMOTO Takashi | yamt-km branch |
| der Mouse | Re: mjf-devfs2 branch |
| Ian Zagorskih | POSIX timer_settime() dosn't set timer in some cases (lost accuracy) |
