mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@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 12:09:35 -0700 (PDT)	[thread overview]
Message-ID: <20090504190935.A0FD4FC32F@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of  Sunday, 3 May 2009 20:55:49 +0200 <20090503185549.GA17087@redhat.com>

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.)

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.)

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.

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.


Thanks,
Roland

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 18:55 Oleg Nesterov
2009-05-03 18:56 ` Oleg Nesterov
2009-05-04 19:09 ` Roland McGrath [this message]
2009-05-04 19:36   ` Oleg Nesterov

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=20090504190935.A0FD4FC32F@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@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

all inboxes | Powered by JetHome®