Re: intercepting syscalls (by setting pointer in sys_call_table)

Itai Nahshon (nahshon@actcom.co.il)
Wed, 24 Mar 1999 14:32:35 +0200


> question: is manipulating sys_call_table, changing the pointer, safe
> (SMP)? not from a functional point of view, I know what I'm doing

I understand that the intercepting function lives in a module.
You should be very careful when you remove the module
(SMP makes it more difficult but its not trivial even on UP).

When you remove the modules it is possible that some processes
are still in an intercepted system call. These functions will
try to return to the intercepting "wrapper" which is now gone.

On UP you can inc/dec the module use count by the wrapper code.
That does not work for SMP.

If this is just for experiments and you can live with wasted
memory, I suggest that you retrieve the original syscall pointer
but never unload the module.

Itai

-- 
Itai Nahshon   nahshon@actcom.co.il
        Also   nahshon@vnet.ibm.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/