From: Oleg Nesterov <oleg@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
James Morris <james.l.morris@oracle.com>,
Fengguang Wu <fengguang.wu@intel.com>,
John Johansen <john.johansen@canonical.com>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2] Yama: access task_struct->comm directly
Date: Thu, 16 Aug 2012 18:56:29 +0200 [thread overview]
Message-ID: <20120816165629.GA12599@redhat.com> (raw)
In-Reply-To: <20120815184155.GA3666@www.outflux.net>
On 08/15, Kees Cook wrote:
>
> v2: update with newly added traceme report.
...
> @@ -319,12 +316,9 @@ static int yama_ptrace_traceme(struct task_struct *parent)
> }
>
> if (rc) {
> - char name[sizeof(current->comm)];
> printk_ratelimited(KERN_NOTICE
> "ptraceme of pid %d was attempted by: %s (pid %d)\n",
> - current->pid,
> - get_task_comm(name, parent),
> - parent->pid);
> + current->pid, parent->comm, parent->pid);
Hmm, yes. This change is even more important. This is called under
write_lock_irq(tasklist_lock), task_lock() can deadlock if we race
with another CPU doing task_lock()->interrupt->read_lock(tasklist).
Oleg.
prev parent reply other threads:[~2012-08-16 18:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 18:41 Kees Cook
2012-08-16 16:56 ` Oleg Nesterov [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=20120816165629.GA12599@redhat.com \
--to=oleg@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=james.l.morris@oracle.com \
--cc=john.johansen@canonical.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/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