Re: Size of pointers in sys_call_table?

From: Andi Kleen (ak@suse.de)
Date: Tue Aug 28 2001 - 11:54:06 EST


Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> > The layout of the sys_call_table is totally architecture dependant. The
> > question to ask here is why do you need to use it? Modifying it to hook
> > into syscalls is frowned upon.
>
> And potentially unsafe (think about caching, and non atomic writes on
> some platforms)

It is ATM impossible to make a module that patches sys_call_table safe against
module unload races. The only way is to put a stub into the main kernel
that manages the module counters and calls a separate hook (i.e. as done
by nfsd's syscall)

[Introducing quiescent states in module unloading would probably fix that,
as it has been discussed for a long time now, but I lost hope that it'll ever
get implemented in the main kernel]

Other than that on some weird architectures like IA64 it can get quite
complicated to patch the syscall table.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:30 EST