From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-kernel@vger.kernel.org,
Frank Haverkamp <haver@linux.vnet.ibm.com>,
Joerg-Stephan Vogt <jsvogt@de.ibm.com>,
Michael Jung <mijung@gmx.net>,
Michael Ruettger <michael@ibmra.de>,
Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>,
Sebastian Ott <sebott@linux.vnet.ibm.com>,
"Eberhard S. Amann" <esa@linux.vnet.ibm.com>,
Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>,
"Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
Subject: Re: [PATCH] signal/GenWQE: Fix sending of SIGKILL
Date: Thu, 20 Sep 2018 15:12:58 +0200 [thread overview]
Message-ID: <20180920131258.GB18628@kroah.com> (raw)
In-Reply-To: <87a7olllkk.fsf@xmission.com>
On Thu, Sep 13, 2018 at 12:48:43PM +0200, Eric W. Biederman wrote:
>
> The genweq_add_file and genwqe_del_file by caching current without
> using reference counting embed the assumption that a file descriptor
> will never be passed from one process to another. It even embeds the
> assumption that the the thread that opened the file will be in
> existence when the process terminates. Neither of which are
> guaranteed to be true.
>
> Therefore replace caching the task_struct of the opener with
> pid of the openers thread group id. All the knowledge of the
> opener is used for is as the target of SIGKILL and a SIGKILL
> will kill the entire process group.
>
> Rename genwqe_force_sig to genwqe_terminate, remove it's unncessary
> signal argument, update it's ownly caller, and use kill_pid
> instead of force_sig.
>
> The work force_sig does in changing signal handling state is not
> relevant to SIGKILL sent as SEND_SIG_PRIV. The exact same processess
> will be killed just with less work, and less confusion. The work done
> by force_sig is really only needed for handling syncrhonous
> exceptions.
>
> It will still be possible to cause genwqe_device_remove to wait 8
> seconds by passing a file descriptor to another process but the possible
> user after free is fixed.
>
> Fixes: eaf4722d4645 ("GenWQE Character device and DDCB queue")
> Cc: stable@vger.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Frank Haverkamp <haver@linux.vnet.ibm.com>
> Cc: Joerg-Stephan Vogt <jsvogt@de.ibm.com>
> Cc: Michael Jung <mijung@gmx.net>
> Cc: Michael Ruettger <michael@ibmra.de>
> Cc: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
> Cc: Eberhard S. Amann <esa@linux.vnet.ibm.com>
> Cc: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
> Cc: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> ---
>
> Greg I intend to take this through my signal tree, but if you would
> rather take this through your driver tree please feel free.
No objection from me for you to take it through your tree:
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent reply other threads:[~2018-09-20 13:13 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <87a7olllkk.fsf@xmission.com>]
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=20180920131258.GB18628@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ebiederm@xmission.com \
--cc=esa@linux.vnet.ibm.com \
--cc=gpiccoli@linux.vnet.ibm.com \
--cc=haver@linux.vnet.ibm.com \
--cc=jsvogt@de.ibm.com \
--cc=klebers@linux.vnet.ibm.com \
--cc=krisman@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ibmra.de \
--cc=mijung@gmx.net \
--cc=sebott@linux.vnet.ibm.com \
/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
Powered by JetHome