Messages in this thread | | | Date | Mon, 18 Jan 1999 15:45:35 -0600 | From | Andy Glew <> | Subject | Re: Adding checkpointing API to Linux kernel |
| |
> > Andy Glew writes about the need for an NT-like (gasp!) API in the > > GNU/Linux that would all trapping of OS system calls without recompiling > > code. (For use in checkpoint migration facilities, which we are > > considering adding to GNU Queue.) Recompilation is necessary to use > > these facilities with commercial apps. The scary thing is it appears to > > be easier in NT than in GNU/Linux (see Andy's comments). Given NT's > > You can already do it in Linux. LD_PRELOAD and LD_LIBRARY_PATH allow you > to control and modify linkloading order. If you get a static linked commercial > binary just ask them for the object modules under the LGPL terms the C library > has to rebuild it (or just for a dynamic binary)
I think the key thing is that the NT APIs allow you to do things like
handle := open(API-name);
FOREACH symbol IN handle.symbollist DO IF is_function(symbol) THEN ... ... dynamically create code to marshall arguments, ... intercept syscall, and then call original syscall. ... ENDIF ENDDO
I.e. you do not have to know, a priori, what functions you want to intercept - as you would have to if placing something on the path. You can intercept them all.
Moreover, you can intercept a call to foo(), have it call your_foo(), and then allow it to continue on to call the default foo().
Come to think of it, I suspect that Beowulf has something similar - note that "marshalling arguments" is a classic RPC (remote procedure call) term. Or maybe Beowulf doesn't need it?
- 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/
| |