public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: Linux Containers <containers@lists.linux-foundation.org>,
	linux-api@vger.kernel.org,
	"Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>,
	linux-fsdevel@vger.kernel.org,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [REVIEW][PATCH 0/4] /proc/thread-self
Date: Fri, 01 Aug 2014 00:45:23 -0700	[thread overview]
Message-ID: <871tt08xgs.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <CAKPyHN1k80fc0hkg7agMkCMDsb623=Zf-TrpyMiMLvtYEjz3_Q@mail.gmail.com> (Bert Wesarg's message of "Fri, 1 Aug 2014 09:14:45 +0200")

Bert Wesarg <bert.wesarg@googlemail.com> writes:

> On Fri, Aug 1, 2014 at 2:30 AM, Eric W. Biederman <ebiederm@xmission.com> wrote:
>>
>> This patchset implements /proc/thread-self a magic symlink that
>> solves a couple of problems.
>
> shouldn't we keep the 'task' in the name, as it points into the 'task'
> directory? And why not mimic the current 'self -> <id>' ideom under
> /proc/<tgid>/task too and put a new 'self' link there:
>
> $ ls -l /proc/self/task/self
>   lrwxrwxrwx 1 root root 0 Aug  1 00:00 /proc/self/task/self -> 484

No particularly good reason.  

Mostly I picked thread-self as I could pick that out as a concept in the
code distinct from self and distinct from thread and it the
implementation was stratighforward.

Your approach requires a bit more symlink recursion than mine so it is
not my first choice.

I almost pointed it at just the sometimes invisible thread directory
directly under /proc so it would be a single number.  But that has the
issue that it you still get the process rollups in the numbers reported
by some of the proc files, which is undesirable.

Frankly I think it was a mistake by the nptl kernel code to have changed
the implementation of self.  But changing /proc/self to return the tid
at this point is more likely than not to beak applications so that I
have avoided.

Eric


      reply	other threads:[~2014-08-01  7:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01  0:30 [REVIEW][PATCH 0/4] /proc/thread-self Eric W. Biederman
2014-08-01  0:33 ` [REVIEW][PATCH 1/4] proc: Have net show up under /proc/<tgid>/task/<tid> Eric W. Biederman
2014-08-01  0:34 ` [REVIEW][PATCH 2/4] proc: Implement /proc/thread-self to point at the directory of the current thread Eric W. Biederman
2014-08-06 14:35   ` Serge E. Hallyn
2014-08-06 18:22     ` Eric W. Biederman
2014-08-06 18:32       ` Serge Hallyn
2014-08-01  0:34 ` [REVIEW][PATCH 3/4] proc: Point /proc/net at /proc/thread-self/net instead of /proc/self/net Eric W. Biederman
2014-08-01  0:35 ` [REVIEW][PATCH 4/4] proc: Point /proc/mounts at /proc/thread-self/mounts instead of /proc/self/mounts Eric W. Biederman
2014-08-01  2:39 ` [REVIEW][PATCH 0/4] /proc/thread-self Davidlohr Bueso
2014-08-01  6:16   ` Eric W. Biederman
2014-08-04 13:12   ` Karel Zak
2014-08-01  6:45 ` Randy Dunlap
2014-08-01  7:01   ` Eric W. Biederman
2014-08-01  7:14 ` Bert Wesarg
2014-08-01  7:45   ` Eric W. Biederman [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=871tt08xgs.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=bert.wesarg@googlemail.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.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