public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jeff Dike <jdike@addtoit.com>,
	utrace-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ptrace: do not use task_lock() for attach
Date: Mon, 4 May 2009 21:36:24 +0200	[thread overview]
Message-ID: <20090504193624.GB17076@redhat.com> (raw)
In-Reply-To: <20090504190935.A0FD4FC32F@magilla.sf.frob.com>

On 05/04, Roland McGrath wrote:
>
> This looks good to me overall.  It might be worth slicing it into two or
> more patches, just for bisect paranoia.  (e.g. PF_KTHREAD; task_lock in
> ptrace_attach; task_lock in ptrace_traceme.)

OK,

> I think it merits a comment that the PF_KTHREAD check does not need any
> interlock because daemonize() will detach ptrace via reparent_to_kthreadd()
> after it sets PF_KTHREAD.  (vs the old ->mm check under task_lock.)

Agreed, but actually the patch doesn't make the difference wrt daemonize().
currently ptrace_attach() can take task_lock() just before daemonize() calls
exit_mm().

> It is worth noting that this changes the security_ptrace_traceme() call so
> it's no longer under task_lock().  I can't see any way the LSM hooks care,
> but it is a change.

Yes, good point.

> You also didn't mention the s/|=/=/ changes.  Those are correct, we've
> already agreed, but the commit log should mention that this subtle change
> was intentional.

Yes! Forgot to mention, thanks.

Oleg.


      reply	other threads:[~2009-05-04 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 18:55 [PATCH 2/2] ptrace: do not use task_lock() for attach Oleg Nesterov
2009-05-03 18:56 ` Oleg Nesterov
2009-05-04 19:09 ` Roland McGrath
2009-05-04 19:36   ` 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=20090504193624.GB17076@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=utrace-devel@redhat.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