We clone is called following pthread_create, we currently use a mega hack to get the entry point that works only for musl. By looking at a specific register we can access the entry point that was left in that particular register when the user called pthread_create. That doesnt work with GlibC because there is something else in that register.
We
clone
is called followingpthread_create
, we currently use a mega hack to get the entry point that works only for musl. By looking at a specific register we can access the entry point that was left in that particular register when the user calledpthread_create
. That doesnt work with GlibC because there is something else in that register.See here: https://github.com/ssrg-vt/hermitux-kernel/blob/master/kernel/syscalls/clone.c#L25