Re: about linux kenel module configure file using xml

From: Valdis.Kletnieks@private
Date: Thu Sep 09 2004 - 07:44:13 PDT


On Thu, 09 Sep 2004 16:26:26 +0800, Yuan Chunyang said:
> One way is :  write a user-space tools to translate the configure file 
> into binary file. The kenel module then reads the binary file, e.g.
> XML file -> binary file -> kenel

Even better would be if a userspace program did the loading by writing the
binary to a sysfs or similar interface (for example, see how SELinux implements
loading a policy).

> I wonder if there are other flexibile ways. Can someone tell me a way to
> parse the XML configure file on kenel space?

The general policy is to only put in the kernel those things that *cannot* be
sanely implemented in userspace.  Since libxml2 is available in userspace,
there's no reason to do it in the kernel..

After having read the Linux-Kernel list for some time, I can state with near
certainty that doing things like XML parsing in kernelspace is a near-certain
way to have the kernel development people mostly just hit the "delete" key, and
possibly tell you what I said in the previous paragraph....






This archive was generated by hypermail 2.1.3 : Thu Sep 09 2004 - 07:44:41 PDT