All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: devpts multiple instances feedback
Date: Mon, 5 Jan 2009 13:09:40 -0800	[thread overview]
Message-ID: <20090105210940.GA31629@us.ibm.com> (raw)
In-Reply-To: <20090103155209.GA17988@lst.de>

Christoph Hellwig [hch@lst.de] wrote:
| I just took a look at the changes going into Linus current tree and
| here's some feedback about the devpts multiple instances code:

Thanks for the review. Here are some quick responses and will go over
comments/patch more closely.

Ccing Alan Cox.

| 
|  - the ptmx node is quite useful, I think it should always be around,
|    even for normal devpts mounts.  That way distros can slowly migrate
|    over to just using it by default and making the containers
|    interaction easier.  It's also in many ways much nicer to have
|    all the pty handling in one filesystems instead of sometimes
|    using the character device.

Making the pts/ptmx node would certianly simplify the code. But we
ended up with some of the complexity to preserve the legacy behavior.
I believe there was some concern that the presence of a "shadow"
ptmx node on older distros might affect rights management (eg: if
the older distro which does not know about /dev/pts/ptmx, applied
a security label to /dev/ptmx that label could be subverted by using
/dev/pts/ptmx ?

That was also one of the reasons for the default 000 mode on the pts/ptmx
device node


|  - the 000 mode is very weird, given how the /dev/ptmx operates
|    it doesn't really make much sense to have it different than 0666
|    unless you want to disable ptys.
|  - why does pts_sb_from_inode have to check s_magic, I can't see
|    it ever used on an inode not from the devpts filesystem

If /dev/ptmx is not a symlink to pts/ptmx, we would need the s_magic
check ? (eg: when called from devpts_new_index()). The check would
not be needed if /dev/ptmx is always a symlink.

|  - parsing the options twice is rather odd, I'd rather parse it into
|    a once allocated structure then passed on through the private
|    data void pointer into get_sb_nodev

Agree :-)

|  - creating the ptmx node should happen inside devfs_fill_super
|  - once the ptmx mknod is gone I think new_pts_mount,
|    is_new_instance_mount, init_pts_mount and maybe even get_init_pts_sb
|    should be merged into devpts_get_sb to make the whole mounting
|    scenario easier to follow instead of having to jump through half
|    a dozen functions
|  - I think CONFIG_DEVPTS_MULTIPLE_INSTANCES is not a good idea,
|    it's not much code and could either be enabled unconditionally or
|    based on the presence of a generic namespaces config option.
|    (btw, this also applies to the other namespaces options, there's

The config token was not needed for the namespaces itself but more
to preserve the legacy behavior. If we don't need o preseve the
legacy mode, we could remove the token.
|    not much of a reason to have millions of options for them,
|    one single option would be a lot easier for the user..)
| --
| To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
| the body of a message to majordomo@vger.kernel.org
| More majordomo info at  http://vger.kernel.org/majordomo-info.html
| Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2009-01-05 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03 15:52 devpts multiple instances feedback Christoph Hellwig
2009-01-03 16:15 ` Christoph Hellwig
2009-01-26 21:53   ` Christoph Hellwig
2009-01-27  3:32     ` Sukadev Bhattiprolu
2009-01-05 21:09 ` Sukadev Bhattiprolu [this message]
2009-01-26 21:55   ` Christoph Hellwig
2009-01-26 21:58     ` Alan Cox
2009-02-01 16:29       ` Christoph Hellwig
2009-02-01 16:41         ` Alan Cox
2009-01-26 21:58     ` H. Peter Anvin
2009-02-01 16:31       ` Christoph Hellwig

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=20090105210940.GA31629@us.ibm.com \
    --to=sukadev@linux.vnet.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.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.