From: Ivan Delalande <colona@arista.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Dmitry Safonov <0x7f454c46@gmail.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH v2] exec: don't force_sigsegv processes with a pending fatal signal
Date: Mon, 11 Feb 2019 15:20:42 -0800 [thread overview]
Message-ID: <20190211232042.GA18232@visor> (raw)
In-Reply-To: <20190211171252.GE21430@redhat.com>
On Mon, Feb 11, 2019 at 06:12:53PM +0100, Oleg Nesterov wrote:
> sorry, I couldn't look at this patch before.
>
> On 02/04, Ivan Delalande wrote:
> >
> > --- a/fs/exec.c
> > +++ b/fs/exec.c
> > @@ -1660,7 +1660,12 @@ int search_binary_handler(struct linux_binprm *bprm)
> > if (retval < 0 && !bprm->mm) {
> > /* we got to flush_old_exec() and failed after it */
> > read_unlock(&binfmt_lock);
> > - force_sigsegv(SIGSEGV, current);
> > + if (!fatal_signal_pending(current)) {
> > + if (print_fatal_signals)
> > + pr_info("load_binary() failed: %d\n",
> > + retval);
>
> I won't argue, but do we really want this spam?
>
> > + force_sigsegv(SIGSEGV, current);
> > + }
> > return retval;
> > }
> > if (retval != -ENOEXEC || !bprm->file) {
> > diff --git a/kernel/signal.c b/kernel/signal.c
> > index e1d7ad8e6ab1..674076e63624 100644
> > --- a/kernel/signal.c
> > +++ b/kernel/signal.c
> > @@ -2552,10 +2552,10 @@ static void signal_delivered(struct ksignal *ksig, int stepping)
> >
> > void signal_setup_done(int failed, struct ksignal *ksig, int stepping)
> > {
> > - if (failed)
> > - force_sigsegv(ksig->sig, current);
> > - else
> > + if (!failed)
> > signal_delivered(ksig, stepping);
> > + else if (!fatal_signal_pending(current))
> > + force_sigsegv(ksig->sig, current);
>
> The changelog doesn't explain this change.
>
> OK, I guess it comes from the previous discussion, setup_rt_frame() can equally fail
> if fatal_signal_pending(). But this should be documented at least in the changelog,
> and I still think we could simply change force_sigsegv() instead.
>
> In any case, Eric has already mentioned that we going to give SIGKILL more priority,
> so I think we can drop this patch?
Yes, I've been running our tests on top of Eric's tree over the week-end
and haven't seen any new hit. I also see that Andrew has dropped the
patch from -mm, so no futher action should be required here.
Thank you for taking a look at the patch anyway.
--
Ivan Delalande
Arista Networks
prev parent reply other threads:[~2019-02-11 23:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 2:53 [PATCH v2] exec: don't force_sigsegv processes with a pending fatal signal Ivan Delalande
2019-02-05 21:11 ` Andrew Morton
2019-02-06 3:10 ` Ivan Delalande
2019-02-08 5:13 ` Eric W. Biederman
2019-02-09 0:16 ` Ivan Delalande
2019-02-10 17:05 ` Eric W. Biederman
2019-02-11 23:25 ` Ivan Delalande
2019-02-11 16:02 ` Oleg Nesterov
2019-02-11 17:12 ` Oleg Nesterov
2019-02-11 23:20 ` Ivan Delalande [this message]
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=20190211232042.GA18232@visor \
--to=colona@arista.com \
--cc=0x7f454c46@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=oleg@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).