lkml.org 
[lkml]   [2005]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Adding a new system call from a module in 2.6
On Fri, 2005-01-14 16:12:38 -0500, linux-os <linux-os@analogic.com>
wrote in message <Pine.LNX.4.61.0501141554530.6747@chaos.analogic.com>:
> On Fri, 14 Jan 2005, Avishay Traeger wrote:
> >Now that the sys_call_table is no longer exported, what would be the
> >best way to add a new system call from a module in 2.6? I have only

Actually, there's no "correct" or good way to do that at all. Currently,
the system call number is used as an index to a pointer table on most
archs (with a bit of added complexity possibly because of supported
different APIs, eg. on MIPS).

However, that's not always true. For the VAX port, we've considered
having structs per syscall, not only a single pointer.

Also, adding syscalls somewhere won't lead to a stable API, so you may
run into problems off the user space...

> >seen the system call table in assembly code (such as in
> >arch/i386/kernel/entry.S) and do not know how to export it. I know that
> >doing this is not recommended, but it would save me a lot of time while
> >developing new system calls (no need to recompile kernel and reboot for
> >every change). Thanks in advance for any suggestions.

For testing purposes, you'd add some dummy entry at the end and register
(through an exported function you've got to add to the core kernel) your
function pointer with it.

However, the basic question is: you you *really* need to have new
syscalls? Just right now, we've already got too many of 'em... So what's
the main goal you want to achieve with your software?

> Just don't expect this to be put into a standard kernel.

Seconded...

MfG, JBG

--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.028 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site