On Tue, 2007-07-31 at 14:08 -0400, Jug Venkatesh wrote:
> Hi,
> 
> I am writing new system calls for a security project, and I was 
> wondering if there is any way to specify whether they will be accessible 
> from user space or kernel space.

System calls are by definition called only from user-space.  If you want
to share the code, you can do something like:
- Make a function sys_foo(), which copies the arguments from user-space,
verifies them, etc.  This would be the system call.
- Have sys_foo() call a function do_foo(), which actually does the work.

The user-space program would make a system call as usual, which would go
to sys_foo().  From the kernel, you would be able to call do_foo().

Avishay


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to