All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Ingo Molnar <mingo@redhat.com>,
	Mandeep Singh Baines <msb@chromium.org>,
	Neil Horman <nhorman@redhat.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Roland McGrath <roland@hack.frob.com>, Tejun Heo <tj@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] coredump: fix the ancient signal problems
Date: Sun, 17 Feb 2013 20:50:44 +0100	[thread overview]
Message-ID: <20130217195044.GA22544@redhat.com> (raw)
In-Reply-To: <CA+55aFx-9Ajb13JfxghNMzoHMJWDtH=a0DZfz2Q-eCBnHyVDPQ@mail.gmail.com>

On 02/17, Linus Torvalds wrote:
>
> On Sun, Feb 17, 2013 at 11:18 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > Linus, et al, could you please ack/nack the intent? Of course I will
> > appreciate if you can review the code, but what I am actually worried
> > about is the user-visible change: the coredumping becomes killable but
> > only by the _explicit_ SIGKILL, other fatal signals are "ignored".
>
> That isn't a problem. In fact, we already have logic that makes the
> act of writing a file be killable by SIGKILL (because you really
> really want that for network filesystems, for example), so I suspect
> that core-dumping was interruptible by SIGKILL even before you made it
> explicitly so - simply because the IO itself was.

Yes, and even pipe_write() can fail if signal_pending() == T.

> And even if it wasn't (because maybe the SIGKILL logic doesn't get
> triggered due to all the special-case core-dumping code in signal
> handling),

Yes, SIGKILL can wakeup (or can miss) the dumping thread sleeping in
->write() but this is not enough. See 2/3.

> SIGKILL really is very very special. Having it kill a
> coredump in progress sounds fine to me.

Great.

> That said, I'm not convinced about your particular split of patches.
> The first patch introduces that new SIGNAL_GROUP_COREDUMP, and then
> the second patch modifies one of the new use cases:
>
> -               tsk->signal->flags |= SIGNAL_GROUP_COREDUMP;
> +               tsk->signal->flags = SIGNAL_GROUP_COREDUMP;
>
>
> and that just smells to me like you tried too hard to split things
> into two patches.

Oh, I disagree, but I wouldn't mind to join these changes assuming
they pass the review (including my self-review tomorrow).

To me, the splitting is "natural". 1/3 protects the dumping thread
from !SIGKILL signals, 2/3 makes makes the dumping thread killable.

Another reason for 1/3 in a separate patch is the documentation,
I think we need more changes in prepare_signal(SIGNAL_GROUP_EXIT)
case.

But I won't insist.

> I wonder if Al
> Viro hould be on the cc.

Hello Al.

I'll send you mbox with this series privately.

Oleg.


  reply	other threads:[~2013-02-17 19:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-17 19:18 [PATCH 0/3] coredump: fix the ancient signal problems Oleg Nesterov
2013-02-17 19:18 ` [PATCH 1/3] coredump: only SIGKILL should interrupt the coredumping task Oleg Nesterov
2013-02-17 19:19 ` [PATCH 2/3] coredump: ensure that SIGKILL always kills the dumping thread Oleg Nesterov
2013-02-17 19:19 ` [PATCH 3/3] coredump: sanitize the setting of signal->group_exit_code Oleg Nesterov
2013-02-17 19:34 ` [PATCH 0/3] coredump: fix the ancient signal problems Linus Torvalds
2013-02-17 19:50   ` Oleg Nesterov [this message]
2013-02-17 20:01     ` Oleg Nesterov
2013-02-20  1:29 ` Mandeep Singh Baines
2013-02-20 22:32   ` Oleg Nesterov
2013-02-20 23:14     ` Andrew Morton
2013-02-23 20:21       ` Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130217195044.GA22544@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=msb@chromium.org \
    --cc=nhorman@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=roland@hack.frob.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.