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

From: Eric W. Biederman
Date: Sun Dec 20 2015 - 04:52:52 EST


"H. Peter Anvin" <hpa@xxxxxxxxx> writes:

> Does it matter if it mounts devpts twice? It seems like a waste of a
> minuscule amount of memory, and nothing else.

It breaks system("mknod /tmp/ptmx c 5 2"); open("/tmp/ptmx");

As it opens a pty in an inaccessible instance of devpts. When
previously the instance of devpts was accessible. So backwards
compatibility is broken.

It doubly matters as we have evidence that b0rken userspace actually
does that things like that.

I will probably get a grumble or two but it turns out it isn't
particularly hard to deal with the overmounting that happens in CentOS6,
and the mounting then unmounting then mounting again that happens in
CentOS5, and openwrt.

For the cases I know to test for I have something that works now. I
am going to sleep on it and then see if I can find think of other
things to test before I push out a patch.

Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/