Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-20 Thread Eric W. Biederman
Konstantin Khlebnikov writes: > On Wed, Apr 20, 2016 at 5:55 PM, Eric W. Biederman > wrote: >> Linus Torvalds writes: >> >>> On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov >>> wrote: On

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-20 Thread Eric W. Biederman
Konstantin Khlebnikov writes: > On Wed, Apr 20, 2016 at 5:55 PM, Eric W. Biederman > wrote: >> Linus Torvalds writes: >> >>> On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov >>> wrote: On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman > > The kernel.pty.reserve sysctl is

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-20 Thread Konstantin Khlebnikov
On Wed, Apr 20, 2016 at 5:55 PM, Eric W. Biederman wrote: > Linus Torvalds writes: > >> On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov >> wrote: >>> On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman The

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-20 Thread Konstantin Khlebnikov
On Wed, Apr 20, 2016 at 5:55 PM, Eric W. Biederman wrote: > Linus Torvalds writes: > >> On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov >> wrote: >>> On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman The kernel.pty.reserve sysctl is neutered with no way currently

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-20 Thread Eric W. Biederman
Linus Torvalds writes: > On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov > wrote: >> On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman >>> >>> The kernel.pty.reserve sysctl is neutered with no way currently >>> implemented to be able to

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-20 Thread Eric W. Biederman
Linus Torvalds writes: > On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov > wrote: >> On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman >>> >>> The kernel.pty.reserve sysctl is neutered with no way currently >>> implemented to be able to use the reserved ptys. >> >> I think we could

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Linus Torvalds
On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov wrote: > On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman >> >> The kernel.pty.reserve sysctl is neutered with no way currently >> implemented to be able to use the reserved ptys. > > I think we could convert this into

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Linus Torvalds
On Tue, Apr 19, 2016 at 9:36 PM, Konstantin Khlebnikov wrote: > On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman >> >> The kernel.pty.reserve sysctl is neutered with no way currently >> implemented to be able to use the reserved ptys. > > I think we could convert this into reserve for init user

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Konstantin Khlebnikov
On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman wrote: > > The /dev/ptmx device node is changed to lookup the directory entry > "pts" in the same directory as the /dev/ptmx device node was opened > in. If there is a "pts" entry and that entry is a devpts filesystem >

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Konstantin Khlebnikov
On Wed, Apr 20, 2016 at 6:04 AM, Eric W. Biederman wrote: > > The /dev/ptmx device node is changed to lookup the directory entry > "pts" in the same directory as the /dev/ptmx device node was opened > in. If there is a "pts" entry and that entry is a devpts filesystem > /dev/ptmx uses that

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Eric W. Biederman
Al Viro writes: > On Tue, Apr 19, 2016 at 10:43:03PM -0500, Eric W. Biederman wrote: >> >> + if (!d_can_lookup(parent)) >> >> + return -ENOENT; >> > >> > And how, pray tell, would a parent of anything fail to be a directory? >> >> It is to make that function be

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Eric W. Biederman
Al Viro writes: > On Tue, Apr 19, 2016 at 10:43:03PM -0500, Eric W. Biederman wrote: >> >> + if (!d_can_lookup(parent)) >> >> + return -ENOENT; >> > >> > And how, pray tell, would a parent of anything fail to be a directory? >> >> It is to make that function be visually distinct from

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Al Viro
On Tue, Apr 19, 2016 at 10:43:03PM -0500, Eric W. Biederman wrote: > >> + if (!d_can_lookup(parent)) > >> + return -ENOENT; > > > > And how, pray tell, would a parent of anything fail to be a directory? > > It is to make that function be visually distinct from path_parentat > which does

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Al Viro
On Tue, Apr 19, 2016 at 10:43:03PM -0500, Eric W. Biederman wrote: > >> + if (!d_can_lookup(parent)) > >> + return -ENOENT; > > > > And how, pray tell, would a parent of anything fail to be a directory? > > It is to make that function be visually distinct from path_parentat > which does

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Eric W. Biederman
Al Viro writes: > On Tue, Apr 19, 2016 at 10:04:20PM -0500, Eric W. Biederman wrote: >> +#ifdef CONFIG_UNIX98_PTYS >> +int path_pts(struct path *path) >> +{ >> +/* Find "pts" in the same directory as the input path */ >> +struct dentry *child, *parent; >> +

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Eric W. Biederman
Al Viro writes: > On Tue, Apr 19, 2016 at 10:04:20PM -0500, Eric W. Biederman wrote: >> +#ifdef CONFIG_UNIX98_PTYS >> +int path_pts(struct path *path) >> +{ >> +/* Find "pts" in the same directory as the input path */ >> +struct dentry *child, *parent; >> +struct qstr this; >> +

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Al Viro
On Tue, Apr 19, 2016 at 10:04:20PM -0500, Eric W. Biederman wrote: > +#ifdef CONFIG_UNIX98_PTYS > +int path_pts(struct path *path) > +{ > + /* Find "pts" in the same directory as the input path */ > + struct dentry *child, *parent; > + struct qstr this; > + int ret; > + > + ret

Re: [PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Al Viro
On Tue, Apr 19, 2016 at 10:04:20PM -0500, Eric W. Biederman wrote: > +#ifdef CONFIG_UNIX98_PTYS > +int path_pts(struct path *path) > +{ > + /* Find "pts" in the same directory as the input path */ > + struct dentry *child, *parent; > + struct qstr this; > + int ret; > + > + ret

[PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Eric W. Biederman
The /dev/ptmx device node is changed to lookup the directory entry "pts" in the same directory as the /dev/ptmx device node was opened in. If there is a "pts" entry and that entry is a devpts filesystem /dev/ptmx uses that filesystem. Otherwise the open of /dev/ptmx fails. The

[PATCH] devpts: Make each mount of devpts an independent filesystem.

2016-04-19 Thread Eric W. Biederman
The /dev/ptmx device node is changed to lookup the directory entry "pts" in the same directory as the /dev/ptmx device node was opened in. If there is a "pts" entry and that entry is a devpts filesystem /dev/ptmx uses that filesystem. Otherwise the open of /dev/ptmx fails. The