[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120816165629.GA12599@redhat.com>
Date: Thu, 16 Aug 2012 18:56:29 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Kees Cook <keescook@...omium.org>
Cc: linux-kernel@...r.kernel.org,
James Morris <james.l.morris@...cle.com>,
Fengguang Wu <fengguang.wu@...el.com>,
John Johansen <john.johansen@...onical.com>,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH v2] Yama: access task_struct->comm directly
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists