linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
To: ext Kees Cook <kees.cook@canonical.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	"linux-security-module@vger.kernel.org"
	<linux-security-module@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] security: Yama LSM
Date: Tue, 22 Jun 2010 15:25:36 +0300	[thread overview]
Message-ID: <4C20ABC0.5050908@nokia.com> (raw)
In-Reply-To: <20100622011452.GN24749@outflux.net>

Hi,

What is YAMA?
Where is the tree?

Thanks,
Dmitry


On 22/06/10 04:14, ext Kees Cook wrote:
> Hi Tetsuo,
>
> On Tue, Jun 22, 2010 at 09:28:37AM +0900, Tetsuo Handa wrote:
>   
>> Kees Cook wrote:
>>     
>>> +       /* require ptrace target be a child of ptracer on attach */
>>> +       if (mode == PTRACE_MODE_ATTACH && ptrace_scope &&
>>> +           !capable(CAP_SYS_PTRACE)) {
>>> +               struct task_struct *walker = child;
>>> +
>>> +               read_lock(&tasklist_lock);
>>>       
>> Holding tasklist_lock does not imply rcu protection.
>> Don't you need rcu_read_lock() like setpriority() and getppid()?
>>     
> You're totally right, thanks for the catch!  Looks like setpriority() does
> a similar kind of thing, so I've wrapped the whole thing in rcu_ now:
>
> ...
> +               rcu_read_lock();
>                 read_lock(&tasklist_lock);
>                 while (walker->pid > 0) {
> ...
>                         rc = -EPERM;
>                 read_unlock(&tasklist_lock);
> +               rcu_read_unlock();
> ...
>
>
> -Kees
>
>   

  reply	other threads:[~2010-06-22 12:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100621213424.GG24749@outflux.net>
     [not found] ` <201006220028.o5M0Sbx7062650@www262.sakura.ne.jp>
2010-06-22  1:14   ` [PATCH] security: Yama LSM Kees Cook
2010-06-22 12:25     ` Dmitry Kasatkin [this message]
2010-06-22 16:06       ` ext Kees Cook
2010-06-23  6:03         ` Christian Stroetmann
2010-06-23  6:22           ` Kees Cook
2010-06-23  6:43             ` Christian Stroetmann
2010-06-23  7:01               ` Kees Cook
2010-06-23  9:16             ` Alan Cox
2010-06-21 21:34 Kees Cook
  -- strict thread matches above, loose matches on Subject: below --
2010-06-21 21:34 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=4C20ABC0.5050908@nokia.com \
    --to=dmitry.kasatkin@nokia.com \
    --cc=kees.cook@canonical.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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;
as well as URLs for NNTP newsgroup(s).