linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [REVIEW][PATCH 0/4] /proc/thread-self
@ 2014-08-01  0:30 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
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Eric W. Biederman @ 2014-08-01  0:30 UTC (permalink / raw)
  To: Linux Containers
  Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA, Michael Kerrisk (man-pages),
	linux-kernel-u79uwXL29TY76Z2rM5mHXA


This patchset implements /proc/thread-self a magic symlink that
solves a couple of problems.

- It makes it easy to get to a specific threads directory in /proc
  with gettid() not being exported in glibc this is currently a pain.

- It allows fixing the problem present in /proc/mounts and /proc/net
  that when the thread group leader exits but the entire thread group
  remains /proc/self/net and /proc/self/mounts and thus /proc/mounts and
  /proc/net become empty.

- As mount and network namespaces are per thread it allows /proc/net and
  /proc/mounts to reflect this.

This is small chance changing /proc/net and /proc/mounts will cause
userspace regressions (although nothing has shown up in my testing) if
that happens we can just point the change that moves them from
/proc/self/... to /proc/thread-self/...

Eric W. Biederman (4):
      proc: Have net show up under /proc/<tgid>/task/<tid>
      proc: Implement /proc/thread-self to point at the directory of the current thread
      proc: Point /proc/net at /proc/thread-self/net instead of /proc/self/net
      proc: Point /proc/mounts at /proc/thread-self/mounts instead of /proc/self/mounts

 fs/proc/Makefile              |  1 +
 fs/proc/base.c                | 18 ++++++---
 fs/proc/inode.c               |  7 +++-
 fs/proc/internal.h            |  6 +++
 fs/proc/proc_net.c            |  2 +-
 fs/proc/root.c                |  5 ++-
 fs/proc/thread_self.c         | 85 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/pid_namespace.h |  1 +
 8 files changed, 117 insertions(+), 8 deletions(-)

Eric

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-08-06 18:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [not found] ` <87oaw5caq1.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
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
     [not found]     ` <87bns5cakh.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2014-08-06 14:35       ` Serge E. Hallyn
     [not found]         ` <20140806143500.GA23127-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2014-08-06 18:22           ` Eric W. Biederman
     [not found]             ` <871tsttr4u.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
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
     [not found]     ` <1406860795.3036.3.camel-5JQ4ckphU/8SZAcGdq5asR6epYMZPwEe5NbjCUgZEJk@public.gmane.org>
2014-08-01  6:16       ` Eric W. Biederman
2014-08-04 13:12       ` Karel Zak
2014-08-01  7:14   ` Bert Wesarg
     [not found]     ` <CAKPyHN1k80fc0hkg7agMkCMDsb623=Zf-TrpyMiMLvtYEjz3_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-01  7:45       ` Eric W. Biederman
2014-08-01  6:45 ` Randy Dunlap
     [not found]   ` <53DB3790.7020600-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-08-01  7:01     ` Eric W. Biederman
2014-08-04 14:47 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).