Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux kernel - add system call dynamically through module

Is there any way to add a system call dynamic, such as through a module? I have found places where I can override an existing system call with a module by just changing the sys_call_table[] array to get my overridden function instead of the native when my module is installed, but can you do this with a new system call and a module?

like image 215
Zach Avatar asked Mar 07 '10 03:03

Zach


1 Answers

No, sys_call_table is of fixed size:

const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { ... 

The best you can do, as you probably already discovered, is to intercept existing system calls.

like image 151
Nikolai Fetissov Avatar answered Oct 05 '22 14:10

Nikolai Fetissov