Justin, thanks for the comment. At Wed, 7 Jan 2015 11:36:46 +0000, Justin Cormack wrote: > > On Wed, Jan 7, 2015 at 7:48 AM, Hajime Tazaki <[email protected]> wrote: > > - failure in hijacking > > > > in hijack.c, system calls are intercepted by LD_PRELOAD, as > > NUSE does. in Linux glibc, some of the functions are using > > strong alias (I guess: need to investigate more) which we > > cannot hijack by LD_PRELOAD. for example, if_nametoindex(3) > > uses '__socket' symbol, which results in inline system calls (we > > can't replace it by our own?). does NetBSD glibc have such a > > system call ? if yes, does librumphijack take a special care? > > > > if not then, is ptrace(2) only a solution for this ? > > This can be a problem. I think NetBSD does not do this as much in such > a problematic way. Looking at Musl libc, which is more readable than > glibc, I see it uses inline syscalls quite a lot. > > The best option is probably to compile a new libc which replaces the > syscalls with library calls. That is what the rumprun-* code does, and > that guarantees you will catch all the calls.
I see your point. recompile libc, which is a thing which we have been avoided ;) # for lazy users, compact code base, etc.. > ptrace is slower I think. You can hijack more functions and replace > them too, but in the end just building a new libc is probably cleaner. indeed, building a new libc is a cleaner way. ptrace, then would be a slow path to enlarge the supported platform (i.e., libc variants). -- Hajime ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ rumpkernel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rumpkernel-users
