Amos Shapira wrote:
Hello,
Is it possible to dynamically add a system call (e.g. by a kernel module)?
The goal of this is that I'd like to add a way to do kernel-level
operation (e.g. given a file name, do a special filesystem operation on
it) which is most natural to do by inventing a new system call. I don't
expect my code to get integrated into the kernel (not at initial stage,
at least) but I'd still like to make it possible for users to say "uhh
ohh, I'd like to make this operation now, without having to reboot to a
special kernel" and be able to download/compile/install a kernel module
which will enable this operation.
Currently my plan is to add a special file under /proc or /dev which any
program will be able to open and then pass the arguments through ioctl(2).
Either that or just write a new virtual file system :-)
Anyway, you're doing the right thing. Just supply a userspace library that wraps
the /dev, /proc or your new file virtual system operation for the user amnd
implement
you "system call" as a library function in it.
Later, when/if your new system call will get accepted into the mainline kernel
and
integrated into glibc and friends he interface can remain the same for the
application,
modulo not requiring your interface library.
Cheers,
Gilad
--
Gilad Ben-Yossef <[EMAIL PROTECTED]>
Codefidence. A name you can trust(tm)
http://www.codefidence.com
Phone: +972.3.7515563 ext. 201 | Cellular: +972.52.8260388
SIP: [EMAIL PROTECTED] | Fax: +972.3.7515503
Lacking fins or tail
the gefilte fish swims with
great difficulty.
-- A Jewish Haiku
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]