Re: Info on adding system calls

From: Peter Samuelson (peter@cadcamlab.org)
Date: Tue Mar 06 2001 - 16:36:26 EST


[T.L.Madhu]
> I want to add a function defined in my loadeble kernel module as
> system call.

You can't. At least not without hackery -- anything is possible with a
bit of hackery.

And there are at least two good reasons for this. First: adding
syscalls at runtime is a recipe for chaos in terms of applications
knowing what the ABI should be. What if two modules wanted the same
unallocated syscall? Should the second one fail, or should it just get
a free syscall, and somehow publish its syscall to userspace so apps
can use it?

The second is philosophical. At the top of the COPYING file in the
kernel source, you see that Linus has made an exception to the GPL, to
allow anyone to write and distribute non-GPL modules, as long as they
do not compile directly into the kernel. However, he doesn't want
people to use this as a general GPL circumvention device, so he will
not make it convenient to extend the system call interface this way.

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 07 2001 - 21:00:20 EST