From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: John Johansen <john.johansen@canonical.com>
Cc: Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org,
James Morris <james.l.morris@oracle.com>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] Yama: access current->comm directly
Date: Mon, 30 Jul 2012 22:50:37 +0100 [thread overview]
Message-ID: <20120730225037.4c8dd450@ultron> (raw)
In-Reply-To: <5016FADD.1030503@canonical.com>
On Mon, 30 Jul 2012 14:21:33 -0700
John Johansen <john.johansen@canonical.com> wrote:
> On 07/30/2012 09:58 AM, Kees Cook wrote:
> > The core ptrace access checking routine already holds the task lock,
> > so there is no need to use get_task_comm() which just tries to take the
> > lock again. Drop its use and access current->comm directly.
> >
> > Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> > Suggested-by: Oleg Nesterov <oleg@redhat.com>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> yep, looks good
>
> Acked-by: John Johansen <john.johansen@canonical.com>
Code looks correct but having a weird cornercase direct reference is
asking for an accident later. For maintainability I'd rather see that as
__get_task_comm() or get_task_commu_unlocked() which does the job, deals
with all the edge cases and contains a WARN_ON check on the lock.
Alan
next prev parent reply other threads:[~2012-07-30 21:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 16:58 [PATCH] Yama: access current->comm directly Kees Cook
2012-07-30 21:21 ` John Johansen
2012-07-30 21:50 ` Alan Cox [this message]
2012-07-30 23:04 ` Kees Cook
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=20120730225037.4c8dd450@ultron \
--to=alan@lxorguk.ukuu.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.