Re: Adding new syscalls via modules?

Alexander Maryanchick (Sasha@GDev.msk.ru)
Mon, 5 Jul 1999 17:46:33 +0400


>> I'd like to know if there's sufficient interest in this, I think it would
>> be brilliant for testing new sysctls/syscalls simply by loading a module
>> and unloading afterwards.

> You can do this manually now, though not in a safe manner, by directly
> changing the sys_call_table array of system calls. Also, in a proposed
patch
> by Alexander Maryanchick (dated around Jun 25), you can do this through
what
> appears to be a cleaner way.

Unfortunately, no. The 'Interceptors' allows to safely intercept *existing*
syscall.
And this is why: Let us say,
- The kernel 2.3.121 has 300 syscalls.
- The tv.o module registers the syscall NR_TURN_ON_TV = 310
- The tetris.o module registers the syscall NR_GET_BONUS = 310
Then you can not use TV and tetris card in one time :-(.

To safely register new function, the kernel requires some sort of naming
service.

It's still possible to use wrapper:
register_syscall("Tetris bonus game", &handler);
in the kernel and
get_syscall_number("Tetris bonus game");
in libc.

But this is already new mechanism - not regular syscalls!

So, instead, I have another proposal: new driver system !!!
We need it! Do you agree?

Continued in "[RFD] new driver system" :-)

Best regards.

Alexander.

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