Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460935
| From | "Robert O'Callahan" <robert@ocallahan.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals |
| Date | 2016-08-12 05:30 +0200 |
| Message-ID | <s5bkt-4Fk-3@gated-at.bofh.it> (permalink) |
| References | <s4Lgm-3pe-17@gated-at.bofh.it> <s4ZW1-5uM-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Thanks! On Fri, Aug 12, 2016 at 3:12 AM, Oleg Nesterov <oleg@redhat.com> wrote: > > The bug happens because when __seccomp_filter() detects > > fatal_signal_pending(), it calls do_exit() without dequeuing the fatal > > signal. When do_exit() sends the PTRACE_EVENT_EXIT > > I _never_ understood what PTRACE_EVENT_EXIT should actually do. I mean, > when it should actually stop. This was never defined. > > > notification and > > that task is descheduled, __schedule() notices that there is a fatal > > signal pending and changes its state from TASK_TRACED to TASK_RUNNING. > > And this can happen anyway, with or without this change, with or without > seccomp. Because another fatal signal can be pending. So PTRACE_EVENT_EXIT > actually depends on /dev/random. True. But at least (as Kees alluded to later) this patch ensures PTRACE_EVENT_EXIT delivery when exit is due to exit_group() and no genuine fatal signals are involved. > Perhaps we should finally define what it should do. Say, it should only > stop if SIGKILL was sent "implicitely" by exit/exec. But as for exec, > there are more (off-topic) complications, not sure we actually want this... The ptrace man page currently says: > A SIGKILL signal may still cause a PTRACE_EVENT_EXIT stop before actual signal death. This may be changed in the future; SIGKILL is meant to always immediately kill tasks even under ptrace. Last confirmed on Linux 3.13. In practice, a PTRACE_EVENT_EXIT is almost always observed after SIGKILL. That's nice for rr, because it lets us observe the process's final state. But it allows a process to stay alive indefinitely after receiving SIGKILL, so I can see why you might want to change it. Rob -- lbir ye,ea yer.tnietoehr rdn rdsme,anea lurpr edna e hnysnenh hhe uresyf toD selthor stor edna siewaoeodm or v sstvr esBa kbvted,t rdsme,aoreseoouoto o l euetiuruewFa kbn e hnystoivateweh uresyf tulsa rehr rdm or rnea lurpr .a war hsrer holsa rodvted,t nenh hneireseoouot.tniesiewaoeivatewt sstvr esn
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] seccomp: Fix tracer exit notifications during fatal signals Kees Cook <keescook@chromium.org> - 2016-08-11 01:40 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals Kyle Huey <me@kylehuey.com> - 2016-08-11 02:20 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals Andy Lutomirski <luto@amacapital.net> - 2016-08-11 09:30 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals Kees Cook <keescook@chromium.org> - 2016-08-11 20:10 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals Oleg Nesterov <oleg@redhat.com> - 2016-08-11 17:20 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals Kees Cook <keescook@chromium.org> - 2016-08-11 20:20 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals Kyle Huey <me@kylehuey.com> - 2016-08-23 05:30 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals Kees Cook <keescook@chromium.org> - 2016-08-23 22:00 +0200
Re: [PATCH] seccomp: Fix tracer exit notifications during fatal signals "Robert O'Callahan" <robert@ocallahan.org> - 2016-08-12 05:30 +0200
csiph-web