Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1295518

Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance

From ebiederm@xmission.com (Eric W. Biederman)
Newsgroups linux.kernel
Subject Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance
Date 2015-12-20 05:30 +0100
Message-ID <qHDN8-4eW-5@gated-at.bofh.it> (permalink)
References (9 earlier) <qEBRv-mG-29@gated-at.bofh.it> <qEBRv-mG-31@gated-at.bofh.it> <qEBRv-mG-9@gated-at.bofh.it> <qFHia-26U-1@gated-at.bofh.it> <qHxeG-8te-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


ebiederm@xmission.com (Eric W. Biederman) writes:

>>> In that system ptys simply did not work after boot when I tested
>>> associating /dev/ptmx with the first mount of the devpts filesystem.
>>
>> Assuming userspace isn't broken by that patch, is a fixed association
>> with first mount otherwise an acceptable solution for magic /dev/ptmx
>> (where /dev/ptmx is not a symlink to /dev/pts/ptmx)?
>
> I do not believe a fixed association with the first mount is an
> acceptable solution for implementing  /dev/ptmx in association with
> a change to cause mount of devpts to be an independent filesystem.
> Such an association fails to be backwards compatible with existing
> userspace, and it is extremely fragile.

Ugh.  After reviewing the userspace code that mounts devpts we have
to do use a magic /dev/ptmx to solve the issue we are trying to solve.

The fragility of detecting the primary system devpts seems solvable.

CentOS5 and openwrt-15.05 mount devpts, unmount devpts,
then mount devpts again.  So a rule of mouting the internal devpts if it
isn't mounted would work for those.

CentOS6 uses switch_root and moves it's early mount of devpts onto the
primary root, and then because devpts is also in /etc/fstab tries and
fails to mount devpts once more at the same location.  Implying
newinstance will make that mounting devpts twice.  That sounds solvable
but I don't see a clean way of detecting that case yet.

Ugh.

I am going to pound my head up against what is needed to find the
primary system mount of devpts for a bit more and see if I can solve
that.  Otherwise this exercise is pointless.

Eric

--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance Peter Hurley <peter@hurleysoftware.com> - 2015-12-14 20:50 +0100
  Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance "H. Peter Anvin" <hpa@zytor.com> - 2015-12-14 21:00 +0100
  Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance ebiederm@xmission.com (Eric W. Biederman) - 2015-12-19 22:30 +0100
    Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance ebiederm@xmission.com (Eric W. Biederman) - 2015-12-20 05:30 +0100
      Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance "H. Peter Anvin" <hpa@zytor.com> - 2015-12-20 05:40 +0100
        Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance ebiederm@xmission.com (Eric W. Biederman) - 2015-12-20 11:00 +0100
          Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance ebiederm@xmission.com (Eric W. Biederman) - 2015-12-21 23:20 +0100
            Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-21 23:30 +0100

csiph-web