Hi, On Fri, January 11, 2008 09:46, Tetsuo Handa wrote:Source isn't needed, as long as the vendor has it. Then why should anyone else support it? Then you can't trust it and it shouldn't have permission to do potentially dangerous things in /dev/ either. Even if you can contain the device node creation, it most likely does other potentially dangerous things too. As a whole it can't be trusted. I'm not talking about devfs, I'm talking about a real static /dev. I'm using it now and it works fine (I let udev manage /udev/ to see what's it's doing). Wrong. All nodes are created and thus there's never a need to create new nodes. So /dev/ can't be modified by anyone. This works because all nodes that anyone might want to create already exist. This would also be true for all nodes in a static /dev I think. In a static /dev you only create the nodes you want. It's true that it can't hide nodes for hardware that doesn't exist (other than deleting the nodes manually), but that was the norm for years before the whole dynamic /dev thing catched up. It doesn't have to be rare, anything is fine. You don't know anything else than udev? (And shell commands like mknod etc.) Then why all the talk about mysterious apps that might need to do all kind of crazy things in /dev? This is true on a theoretical level. But practically I think you can either run multiple daemons, one for each namespace where you want to control /dev/, or if you really want one daemon you can pass the directory fd to it where the node should be created and use mknodat(). I believe that crosses namespaces correctly. If the daemon can't be contacted or doesn't want to do a mknod for you, the preloaded lib can fallback to doing the mknod itself, though normally that would be disallowed by MAC. But I think that the chance that any process needs to create device nodes in a chroot is at the level of fairy existance. If the preloaded library is setuid, it will also work for setuid programs. It's true that it won't work for statically linked apps, but so what? Device node creating apps are rare enough, let alone the ones that are also statically linked. Nice theoretical problem, but I don't think anyone will care in practice. That "only the tiny daemon can modify /dev/" is done with MAC rules, the ones that should be the default for all applications except udev by default already. For teh kernel nothing changes. Or ignore the problem and see if it's a real problem or a nice theoretical case. And when it turns out to be a real problem, there are probably ways to fix it (See above). But you know what exactly is needed only after problems do turn up. With this the filesystem at least adds some unique abilities. If anyone really needs it and where/how it should be implemented is another matter. Without it it's a glorified and complicated drop-in replacement for a static /dev/. Regards, Indan - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Andrew Morton | -mm merge plans for 2.6.23 |
| Benjamin Herrenschmidt | Re: [PATCH] Remove process freezer from suspend to RAM pathway |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Mel Gorman | [PATCH 6/8] x86_64 - Specify amount of kernel memory at boot time |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | Re: Soft-Lockup/Race in networking in 2.6.31-rc1+195 ( possibly?caused by netem) |
