[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240619155016.GC24240@redhat.com>
Date: Wed, 19 Jun 2024 17:50:17 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Tejun Heo <tj@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/17] signal: Make SIGKILL during coredumps an explicit
special case
Hi Eric,
I'll _try_ to read this (nontrivial) changes this week. To be honest,
right now I don't really understand your goals after the quick glance...
So far I have only looked at this simple 1/17 and it doesn't look right
to me.
On 06/18, Eric W. Biederman wrote:
>
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -907,8 +907,12 @@ static bool prepare_signal(int sig, struct task_struct *p, bool force)
> sigset_t flush;
>
> if (signal->flags & SIGNAL_GROUP_EXIT) {
> - if (signal->core_state)
> - return sig == SIGKILL;
> + if (signal->core_state && (sig == SIGKILL)) {
> + struct task_struct *dumper =
> + signal->core_state->dumper.task;
> + sigaddset(&dumper->pending.signal, SIGKILL);
> + signal_wake_up(dumper, 1);
> + }
and after that it returns false so __send_signal_locked/send_sigqueue simply
return. This means:
- the caller will wrongly report TRACE_SIGNAL_IGNORED
- complete_signal() won't be called, so signal->group_exit_code
won't be updated.
coredump_finish() won't change it too so the process will exit
with group_exit_code == signr /* coredumping signal */.
Yes, the fix is obvious and trivial...
Oleg.
Powered by blists - more mailing lists