From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Chris Wright <chrisw@sous-sol.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] ptrace: cleanup check/set of PT_PTRACED during attach
Date: Wed, 6 May 2009 17:31:59 -0700 (PDT) [thread overview]
Message-ID: <20090507003159.73DE8FC39E@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of Thursday, 7 May 2009 01:30:27 +0200 <20090506233027.GB3756@redhat.com>
> The only case when a task owns (iow, can change it safely) its ->ptrace
> is: it is running _and_ traced. I think this is what the comment tried
> to say.
I think so. I suspect it only ever referred to now-obsolete uses like
PT_DTRACE fiddling.
> But this doesn't really matter, because afaics the correct comment
> should say: the task should never touch its ->ptrace, ptracer always
> owns it.
To be clear, it should say something about how two potential ptracers
exclude each other touching it.
> There is only one exception afaics, de_thread() or do_wait() can call
> release_task()->ptrace_unlink() and clear ->ptrace on behalve of
> another (not ptracer) task.
And ptrace_traceme(). Both of these I'd call "on behalf of the tracer",
and that is close enough to "tracer owns it" if their rules are explained.
(That in contrast to the old comment's suggestion that the tracee could
touch its own unlocked.)
Thanks,
Roland
prev parent reply other threads:[~2009-05-07 0:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 22:47 Oleg Nesterov
2009-05-06 2:07 ` Roland McGrath
2009-05-06 7:44 ` Ingo Molnar
2009-05-06 23:30 ` Oleg Nesterov
2009-05-07 0:31 ` Roland McGrath [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=20090507003159.73DE8FC39E@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@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®