Greg KH <gre...@linuxfoundation.org> writes: > On Thu, Oct 04, 2012 at 10:29:51AM -0700, Eric W. Biederman wrote: >> There are still quite a few interesting cases that devtmpfs does not >> even think about supporting. Cases that were reported when devtmpfs was >> being reviewed. > > Care to refresh my memory?
Anyone who wants something besides the default policy. Containers chroots anyone who doesn't want /dev/console to be c 5 1. >> Additionally the devtmpfs maintainership has not dealt with legitimate >> concerns any better than this firmware issue has been dealt with. I >> still haven't even hear a productive suggestion back on the hole >> /dev/ptmx mess. > > I don't know how to handle the /dev/ptmx issue properly from within > devtmpfs, does anyone? Proposals are always welcome, the last time this > came up a week or so ago, I don't recall seeing any proposals, just a > general complaint. The proposal at that time was to work around the silliness with a little kernel magic. To recap for those who haven't watched closely. devpts now has a ptmx device node and it would be very nice if we were to use that device node instead of /dev/ptmx. Baically it would be nice to tell udev to not create /dev/ptmx, and instead to make /dev/ptmx a symlink to /dev/pts/ptmx. I got to looking at the problem and if I don't worry about systemd and just look at older versions of udev that are out there in the wild it turns out the following udev configuratoin line does exactly what is needed. It creats a symlink from /dev/ptmx to /dev/pts/ptmx. And if on the odd chance devpts is not mounted it creates /dev/pts/ptmx as well. KERNEL=="ptmx" NAME:="pts/ptmx" SYMLINK="ptmx" Does assigning to NAME to specify the device naming policy work in systemd-udev or has that capability been ripped out? Thinking about it. Since systemd-udev no longer supports changing the device name. And likely it no longer even supports assigning to NAME even for purposes of changing the target of the symlink. Then I expect what we want to do is: diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index 147d1a4..7dc5bed 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -377,6 +377,7 @@ static int devtmpfsd(void *p) goto out; sys_chdir("/.."); /* will traverse into overmounted root */ sys_chroot("."); + sys_symlink("pts/ptmx", "ptmx"); complete(&setup_done); while (1) { spin_lock(&req_lock); Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/