Re: intercepting syscalls (by setting pointer in sys_call_table)

Mike (mike@oxlug.org)
Thu, 25 Mar 1999 15:12:49 +0000 (GMT)


On Wed, 24 Mar 1999, Itai Nahshon wrote:

> > 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.
>
Surely on SMP and UP, if you increment the module use count every time
your wrapper function gets called, and decrement it after the original
syscall returns then this won't happen. Or am I missing something?

-- 
Mike <rickettm@ox.compsoc.net>

The worst part of valor is indiscretion.

- 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/