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>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] forget_original_parent: cleanup ptrace pathes
Date: Wed,  4 Feb 2009 18:40:20 -0800 (PST)	[thread overview]
Message-ID: <20090205024021.04DDDFC381@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of  Thursday, 29 January 2009 09:06:03 +0100 <20090129080603.GA26882@redhat.com>

> - Fold ptrace_exit() into forget_original_parent(), it is trivial
>   now. More importantly, this makes the code more symmetrical with
>   reparent_thread().

Please don't do this.  The ptrace functions are separated not because they
are large, but because they are the ptrace innards.  We have been moving
away from the core task handling innards having intimate ptrace magic
knowledge directly intertwined, and we don't want to move back the other
way.  In later cleanups, we will eventually separate ptrace linkage from
the tasklist_lock'd parent/child linkage more thoroughly.

> - The same for ptrace_exit_finish(), and "ptrace_" is not correct
>   any longer.
> 
> - "ptrace_dead" doesn't match the reality, rename to "dead_list".

For the same reasons, I am not entirely sanguine about overloading
ptrace_entry for any case not related to ptrace.  We want to be able to
clean up the ptrace data structures in the future such that there may well
not be any such list_head allocated in an untraced task_struct.

This case is sufficiently obscure, I can't see that anyone would really
care about the marginal performance hit for just dropping the lock after
reparent_thread returns true, call release_task(), re-lock and restart the
loop on remaining children.  (And I don't see any atomicity problem with
this unlock/relock.)

> - swap the reparent_thread()'s arguments, just to make it more
>   symmetrical with __ptrace_detach().

No problem there.


Thanks,
Roland

  reply	other threads:[~2009-02-05  2:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29  8:06 Oleg Nesterov
2009-02-05  2:40 ` Roland McGrath [this message]
2009-02-05 15:33   ` Oleg Nesterov
2009-02-09  2:36     ` Roland McGrath
2009-02-10 22:47       ` Oleg Nesterov
2009-02-10 23:23         ` Roland McGrath
2009-02-10 23:40           ` Oleg Nesterov
2009-02-10 23:53             ` Roland McGrath

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=20090205024021.04DDDFC381@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®