lkml.org 
[lkml]   [1998]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Demo of patching syscalls from a module

This won't work at all on some architectures, assuming the format and
layout of the syscall table is a very bad idea and simply won't work.

For example, on the MIPS this table is of the form
[ syscall_function, num_args ] so would not work with
your technique.

There are other issues, such as on sparc64, where another system call
table holds the 32-bit compatability versions of every supported
system call. Also nothing says anything about what the name of the
system call table should even be.

Finally, the other solution to adding system calls is to have a
dummy function of some sort statically linked into the kernel, it has
an assosciated function pointer it checks, which is set when the
module containing the real system call implementation is loaded (this
is what knfsd does). Really system calls should be added with a lot
of care, and not just done on a whim, this is why I am sort of happy
it's a real pain to add them using loadable modules by just changing
entries in the table directly ;-) There are almost always numerous
other methods by which you can obtain the same ends, via pseudo
devices and ioctl()'s for example.

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.109 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site