Messages in this thread | | | Date | Tue, 23 Mar 1999 13:00:46 -0800 (PST) | From | Michael Hasenstein <> | Subject | intercepting syscalls (by setting pointer in sys_call_table) |
| |
not really useful, just playing around, but learned a lot through it...
what I do: change the entry for a syscall in sys_call_table to point to my own funtion (which does a few printk() and then jumps to the original pointer with the original arguments), using a module (inserted: use my function, remove: re-insert original pointer into sys_call_table).
question: is manipulating sys_call_table, changing the pointer, safe (SMP)? not from a functional point of view, I know what I'm doing (even if my system dies ;-) ), but is it SMP-safe? I read a little arch/i386/entry.S, _very_ interesting, but doesn't help that much... I'm asking because someone who tried the same on his SMP system complained about a system crash when he unloaded the module, and the only line of code for unload is
void cleanup_module(void) { sys_call_table[__NR_(whatever-syscall-I'm-experimenting with)] = origsockcall; }
and now I'm trying to find the reason, not for any real purpose, only for the sake of knowing-why...
Thanks! == -- Michael Hasenstein http://www.csn.tu-chemnitz.de/~mha/ Private Pilot (ASEL) since 1998 _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com
- 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/
| |