Re: execve replacement.

From: John Levon (moz@compsoc.man.ac.uk)
Date: Wed Oct 04 2000 - 09:20:01 EST


On Wed, 4 Oct 2000, Brian Gerst wrote:

> Even your overloader has a small module unload race. The only 100%
> race-free way is to put module usage counting into the core kernel, like
> the VFS changes with ->open that were done in 2.3.x. This would mean
> added overhead for all syscalls, so many people would oppose this.
>
> --

Whose overloader ? I didn't write it ...

anyway, you can just put refcounts in your hijacked system calls; that is
the safe way to do it, and doesn't require any kernel patches, just extra
cost in the intercepted system calls.

e.g. :

my_syswhatever(...)
{
        MOD_INC_USE_COUNT;
        original_syswhatever(...);
        MOD_DEC_USE_COUNT;
}

Can you explain to me the race with this approach ?

thanks
john

-- 
"The Internet is a shallow and unreliable electronic repository of dirty pictures, inaccurate rumors,
 bad spelling and worse grammar, inhabited largely by people with no demonstrable social skills."
	- Chronicle of Higher Education

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



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:14 EST