On Thu, Feb 06, 2003 at 10:44:36PM +0100, Jerome de Vivie wrote: > Erik Mouw wrote: > > Persistent data really should be handled by a usermode helper, cause > > the decision *where* to store it is policy. See for example how alsactl > > handles the state of all ALSA soundcards in the system. See also how a > > couple of USB devices get their firmware uploaded through a generic > > device node. > > Are you really sure that every "policy" thing should stay outside > kernelspace ? You don't even know want i want to do. How can you judge > my design ? I need to update my "persistant" upon filesystem events. > Will you help me to trap those from userspace ? At OLS 2002 there was an interesting discussion about persistant data in drivers during and after the talks from Arjan van der Ven[1] and Greg Kroah-Hartman[2]. The bottom line was that there really is no excuse to handle persistant data in the kernel. Arjan made some excellent points why you shouldn't mess with files in the kernel: - Writing a secure parser is non-trivial. Writing a secure kernel-mode parser is even more non-trivial. - Every process has its own namespace and hence its own root directory. Autoloading the driver means the module will be using /sbin/init's namespace, loading it manually will use whatever namespace root is in right now. Add chroot for more fun. - With initrd there even is a security risk. The complete OLS 2002 proceedings (including the papers mentioned) are available as a PDF file at http://www.linuxsymposium.org/2002/ . Erik [1] Arjan van der Ven, "How NOT write kernel drivers". See http://www.linuxsymposium.org/2002/view_txt.php?text=abstract&talk=73 [2] Greg Kroah-Hartman, "Documentation/CodingStyle and Beyond". See http://www.linuxsymposium.org/2002/view_txt.php?text=abstract&talk=57 -- J.A.K. (Erik) Mouw Email: J.A.K.Mouw@its.tudelft.nl mouw@nl.linux.org
Attachment:
pgp00294.pgp
Description: PGP signature