Re: hook of syscall

From: Borislav Deianov (borislav@lix.polytechnique.fr)
Date: Thu Apr 20 2000 - 13:26:49 EST


On Thu, Apr 20, 2000 at 07:12:03PM +0100, Tigran Aivazian wrote:
> On Thu, 20 Apr 2000, Borislav Deianov wrote:
> > Modifying sys_call_table from a module works fine but is architecture
> > specific (I'm told) and gets intersting when two modules try to
> > intercept the same system call.
>
> this interesting part can be resolved rather straightforward by providing
> an (exported) read-write spinlock that is taken for read on each system
> call and write by those wishing to modify sys_call_table[]. (this is not
> nice because of the effort of taking even a read spinlock on each syscall)

Yup, I forgot about that. I was actually thinking about rmmod - a
module cannot be safely removed if another one intercepted the same
syscall after it (as explained in the Linux Kernel Module Programming
Guide). The funny thing is TSRs under DOS had exactly the same problem
with interrupts :)

Regards,
Borislav

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



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:17 EST