Messages in this thread | | | Date | Mon, 7 Jul 2008 08:36:58 -0400 | From | "Jinkai Gao" <> | Subject | Re: Suggestion: LKM should be able to add system call for itself |
| |
On Mon, Jul 7, 2008 at 4:40 AM, Bart Van Assche <bart.vanassche@gmail.com> wrote: > On Mon, Jul 7, 2008 at 7:09 AM, Jinkai Gao <mickeygjk@gmail.com> wrote: >> LKM(loadable kernel module) was first introduced for drivers. Users >> rarely need to talk to the modules directly. If does, several methods >> are available now, such as /proc file, interruption, etc. However, >> these interfaces are predefined, which makes the communication between >> user space and kernel space quite restricted. > > Did you already have a look at e.g. http://lwn.net/Kernel/LDD3/ for > suggestions of alternatives for communication between userspace and > kernel modules ? Alternatives to system calls are e.g. ioctl's, memory > mapped I/O and sockets.
Yes, all kinds of alternatives exist. But they are alternatives anyway, which are tricky ways to do things when you can't find a reasonable ways. Actually,to communication between userspace and kernel modules, all I need is a interface with two parameters, all the system calls can be implemented out of that. So basically you can write every system call using something like ioctl. But ioctl is not designed for generic purpose after all.
Why the number of system calls is growing? because the kernel is growing. why we don't use the alternatives to implement the new need for system calls? Because it doesn't make any sense. We can't ignore the kernel modules' need for system calls just because they are loadable.
| |