All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Subject: Re: Multiple instances of devpts
Date: Sat, 12 Apr 2008 12:24:32 -0700	[thread overview]
Message-ID: <48010C70.2030902@zytor.com> (raw)
In-Reply-To: <1208027757.28187.25.camel-xJGG6ySDJhrj0SQisxZUdA@public.gmane.org>

Eric W. Biederman wrote:
>>
>> /dev/ptmx can be a symlink ptmx -> pts/ptmx, and we add a ptmx instance 
>> inside the devpts filesystem.  Each devpts filesystem is responsible for 
>> its own pool of ptys, with own numbering, etc.
>>
>> This does mean that entries in /dev/pts are more than just plain device 
>> nodes, which they are now (you can cp -a a device node from /dev/pts 
>> into another filesystem and it will still "just work"), but I doubt this 
>> actually matters to anyone.  If anyone cares, now I guess would be a 
>> good time to speak up.
> 
> Agreed.   That is another legitimate path.  And if all you care about is
> isolation and not dealing with the general class of problems with the
> global device number to device mapping that is sane.  I know we have
> several other virtual devices that we tend to care about but ptys are
> the real world pain point.
> 

Thinking about it further, allowing this restriction would also allow a 
whole lot of cleanups inside the pty setup, since it would eliminate the 
need to do a separate lookup to find the corresponding devpts entry in 
pty_open().  The benefit here comes from the closer coupling between the 
pty and the devpts filesystem and isn't at all related to namespaces, 
but it's a very nice side benefit.

	-hpa

WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
	sukadev@us.ibm.com, Andrew Morton <akpm@osdl.org>,
	serue@us.ibm.com, matthltc@us.ibm.com,
	Pavel Emelyanov <xemul@openvz.org>,
	Containers <containers@lists.osdl.org>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: Multiple instances of devpts
Date: Sat, 12 Apr 2008 12:24:32 -0700	[thread overview]
Message-ID: <48010C70.2030902@zytor.com> (raw)
In-Reply-To: <1208027757.28187.25.camel@x61.ebiederm.org>

Eric W. Biederman wrote:
>>
>> /dev/ptmx can be a symlink ptmx -> pts/ptmx, and we add a ptmx instance 
>> inside the devpts filesystem.  Each devpts filesystem is responsible for 
>> its own pool of ptys, with own numbering, etc.
>>
>> This does mean that entries in /dev/pts are more than just plain device 
>> nodes, which they are now (you can cp -a a device node from /dev/pts 
>> into another filesystem and it will still "just work"), but I doubt this 
>> actually matters to anyone.  If anyone cares, now I guess would be a 
>> good time to speak up.
> 
> Agreed.   That is another legitimate path.  And if all you care about is
> isolation and not dealing with the general class of problems with the
> global device number to device mapping that is sane.  I know we have
> several other virtual devices that we tend to care about but ptys are
> the real world pain point.
> 

Thinking about it further, allowing this restriction would also allow a 
whole lot of cleanups inside the pty setup, since it would eliminate the 
need to do a separate lookup to find the corresponding devpts entry in 
pty_open().  The benefit here comes from the closer coupling between the 
pty and the devpts filesystem and isn't at all related to namespaces, 
but it's a very nice side benefit.

	-hpa

  parent reply	other threads:[~2008-04-12 19:24 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-12 17:29 [PATCH 0/4] Helper patches for PTY namespaces sukadev
2008-04-12 17:32 ` [PATCH 1/4]: Propagate error code from devpts_pty_new sukadev
2008-04-12 17:32 ` [PATCH 2/4]: Factor out PTY index allocation sukadev
2008-04-12 17:33 ` [PATCH 3/4]: Move devpts globals into init_pts_ns sukadev
2008-04-12 17:34 ` [PATCH 4/4]: Enable multiple mounts of /dev/pts sukadev
     [not found] ` <20080412172933.GA19295-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-04-12 17:39   ` [PATCH 0/4] Helper patches for PTY namespaces Subrata Modak
     [not found]     ` <bb33bcf20804121039u409ae37q2dead849ca24dfa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-12 18:05       ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]         ` <20080412180533.GE19449-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-04-14 11:20           ` [LTP] " Subrata Modak
     [not found]             ` <1208172006.5762.21.camel-NRFfyExJdYpgXGGE5LP+UZlqa2bBAFbm0E9HWUfgJXw@public.gmane.org>
2008-04-14 12:31               ` Veerendra Chandrappa
     [not found]                 ` <OF766ECBB8.8B7DAFCE-ON6525742B.00437346-6525742B.0043FD8A-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org>
2008-04-14 12:31                   ` Subrata Modak
     [not found]                     ` <1208176260.5762.36.camel-NRFfyExJdYpgXGGE5LP+UZlqa2bBAFbm0E9HWUfgJXw@public.gmane.org>
2008-04-22  7:11                       ` Subrata Modak
     [not found]                         ` <1208848319.4847.16.camel-NRFfyExJdYpgXGGE5LP+UZlqa2bBAFbm0E9HWUfgJXw@public.gmane.org>
2008-04-22 12:25                           ` Serge E. Hallyn
     [not found]                             ` <20080422122530.GB8331-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2008-04-22 15:08                               ` [LTP] " Subrata Modak
2008-04-23 18:01                               ` H. Peter Anvin
2008-04-12 18:09   ` H. Peter Anvin
2008-04-12 18:09     ` H. Peter Anvin
2008-04-12 18:35 ` Al Viro
2008-04-12 18:54   ` Multiple instances of devpts H. Peter Anvin
2008-04-12 19:15     ` Eric W. Biederman
     [not found]       ` <1208027757.28187.25.camel-xJGG6ySDJhrj0SQisxZUdA@public.gmane.org>
2008-04-12 19:24         ` H. Peter Anvin [this message]
2008-04-12 19:24           ` H. Peter Anvin
     [not found]           ` <48010C70.2030902-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2008-04-12 19:30             ` H. Peter Anvin
2008-04-12 19:30               ` H. Peter Anvin
2008-04-12 19:06 ` [PATCH 0/4] Helper patches for PTY namespaces Eric W. Biederman
2008-04-13  0:59   ` Serge E. Hallyn
     [not found]   ` <1208027215.28187.17.camel-xJGG6ySDJhrj0SQisxZUdA@public.gmane.org>
2008-08-01 18:12     ` Per-instance devpts H. Peter Anvin
2008-08-01 18:12       ` H. Peter Anvin
2008-08-01 19:23       ` Dave Hansen
2008-08-01 19:35         ` Al Viro
2008-08-01 19:37         ` H. Peter Anvin
     [not found]       ` <f73f7ab80808020004j15b0d0e5x5fa911242641b34d@mail.gmail.com>
2008-08-02  7:06         ` Kyle Moffett
     [not found]           ` <f73f7ab80808020006i7f0ac456ve9b9f73568c11294-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-02 15:33             ` H. Peter Anvin
2008-08-02 15:33               ` H. Peter Anvin
2008-08-02  8:54       ` Bastian Blank
2008-08-03  5:08       ` sukadev
     [not found]         ` <20080803050800.GA4322-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-08-03 11:31           ` H. Peter Anvin
2008-08-03 11:31             ` H. Peter Anvin
2008-08-03 12:04           ` Alan Cox
2008-08-03 12:04             ` Alan Cox
2008-08-03 17:46             ` sukadev
2008-08-03 17:54               ` Alan Cox

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=48010C70.2030902@zytor.com \
    --to=hpa-ymnouzjc4hwavxtiumwx3w@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    --cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.