On Friday, May 23, 2008 4:00 PM, "Greg KH" wrote: > On Fri, May 23, 2008 at 02:32:46PM -0600, Vadim Klishko wrote: >> Hello Everybody, >> >> Could anyone please tell me what functions I could call from a Linux kernel module to: >> >> 1) dynamically load a library, > > None. > >> 2) get the address of an exported function, > > None. > >> 3) unload the library? > > None. > > None of these things are things that you should do from within a kernel > module. > >> Also, what are the functions that would allow me to read from and >> write to a binary or text file from within a kernel module? > > None, this is not what a kernel module should ever be doing. > > Let's turn it around the other way, what are you trying to achieve that > makes you think the above things are necessary to do? > By reading a file, I am trying to load a system-wide device configuration. Of course, it could be hard-coded into the module, but why not try having it adjustable? The driver I am writing is for touchpads. Some customers want their devices to have functionality different from a standard mouse. For example, they may want to turn a touchpad into a keypad, where touching the surface in certain areas produces keystrokes. For those customers (OEM) who use a touchpad module to create their own device, this pretty much amounts to having a customized driver. Instead of having to build a new driver, they could simply edit the configuration file. >> Any help will be sincerely appreciated. > > The kernelnewbies mailing list and wiki covers the above topic in great > detail if you wish to understand why you should not be doing any of the > above from within the kernel. > Thank you for pointing me to kernelnewbies. I realize it's premature to argue before I have read their arguments against doing these things in the kernel, but the first objection that crosses my mind is this: I can do it in Windows. Why not in Linux? > thanks, > > greg k-h Vadim