ssrg-vt / hermitux

A binary-compatible unikernel
https://ssrg-vt.github.io/hermitux/
391 stars 28 forks source link

Pthread support with Glibc #3

Closed olivierpierre closed 4 years ago

olivierpierre commented 5 years ago

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.

See here: https://github.com/ssrg-vt/hermitux-kernel/blob/master/kernel/syscalls/clone.c#L25

olivierpierre commented 4 years ago

Fixed for x86-64: https://github.com/ssrg-vt/hermitux-kernel/commit/e1a0dcaf763403ae7bf7d0c202da74f43cd1d409