Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565086
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] prctl: propagate has_child_subreaper flag to every descendant |
| Date | 2017-01-23 17:10 +0100 |
| Message-ID | <t2PlT-9t-3@gated-at.bofh.it> (permalink) |
| References | <t1o4r-3Xc-59@gated-at.bofh.it> <t1LX3-2d6-5@gated-at.bofh.it> <t2LrY-5Y8-19@gated-at.bofh.it> <t2LrY-5Y8-17@gated-at.bofh.it> <t2PlT-9t-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/23, Pavel Tikhomirov wrote: > > >IOW. Currently CRIU can't restore the process tree with the same > >has_child_subreaper bits if some process forks before > >prctl(PR_SET_CHILD_SUBREAPER). It restores the tree as if prctl() > >was called before the 1st fork. > > > >So you change the semantics of PR_SET_CHILD_SUBREAPER and now CRIU > >is fine simply because you remove this feature: the sub-reaper can > >no longer pre-fork the children which should reparent to the previous > >reaper. > > > >I won't really argure, but I am not sure this is good idea... > > If one task uses these feature now it must be very carefull: if some our > ancestor have enabled is_child_subreaper somewhere up the tree, forked our > tree and after that disabled is_child_subreaper, so we already have has-flag > and all children will inherit has-flag irrelevant to what is our order of > fork/prctl-ing to become subreaper. Agreed. So let me reword my initial question, why did you make this patch? Did you actually hit a case when a child of is_child_subreaper process doesn't have has_child_subreaper bit set? If yes, then perhaps that application has a reason to do this and your patch can break it? If no, then you can probably forget this until you have a CRIU bug report ;) But let me repeat, I won't really argue. And I even agree that this change makes the semantics of PR_SET_CHILD_SUBREAPER more clear, just I am always nervous when we add the subtle user-visible changes like this, and I greatly misundestood the changelog as if CRIU needs to do prctl(SET_CHILD_SUBREAPER) after it has already restored the process tree and this can't work even in the common case. Oleg.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] prctl: propagate has_child_subreaper flag to every descendant Pavel Tikhomirov <ptikhomirov@virtuozzo.com> - 2017-01-19 17:50 +0100
Re: [PATCH] prctl: propagate has_child_subreaper flag to every descendant Oleg Nesterov <oleg@redhat.com> - 2017-01-20 19:20 +0100
Re: [PATCH] prctl: propagate has_child_subreaper flag to every descendant Oleg Nesterov <oleg@redhat.com> - 2017-01-23 13:00 +0100
task_is_descendant() cleanup Oleg Nesterov <oleg@redhat.com> - 2017-01-23 14:00 +0100
Re: task_is_descendant() cleanup Kees Cook <keescook@chromium.org> - 2017-01-25 23:10 +0100
Re: task_is_descendant() cleanup Oleg Nesterov <oleg@redhat.com> - 2017-01-30 15:00 +0100
Re: [PATCH] prctl: propagate has_child_subreaper flag to every descendant Oleg Nesterov <oleg@redhat.com> - 2017-01-23 17:10 +0100
[PATCH] introduce the walk_process_tree() helper Oleg Nesterov <oleg@redhat.com> - 2017-01-23 13:00 +0100
Re: [PATCH] introduce the walk_process_tree() helper Oleg Nesterov <oleg@redhat.com> - 2017-01-23 13:10 +0100
setns() && PR_SET_CHILD_SUBREAPER Oleg Nesterov <oleg@redhat.com> - 2017-01-23 18:00 +0100
Re: setns() && PR_SET_CHILD_SUBREAPER ebiederm@xmission.com (Eric W. Biederman) - 2017-01-23 19:30 +0100
Re: setns() && PR_SET_CHILD_SUBREAPER Oleg Nesterov <oleg@redhat.com> - 2017-01-24 15:10 +0100
Re: setns() && PR_SET_CHILD_SUBREAPER ebiederm@xmission.com (Eric W. Biederman) - 2017-01-24 16:30 +0100
Re: setns() && PR_SET_CHILD_SUBREAPER Oleg Nesterov <oleg@redhat.com> - 2017-01-30 19:20 +0100
[PATCH] exit: fix the setns() && PR_SET_CHILD_SUBREAPER interaction Oleg Nesterov <oleg@redhat.com> - 2017-01-30 19:20 +0100
csiph-web