mythos icon indicating copy to clipboard operation
mythos copied to clipboard

rewrite kernel TLS (aka Core Local Memory)

Open rottaran opened this issue 7 years ago • 1 comments

Mythos uses %gs as offset and the TLS variable's address as base. This allows to work with 32bit GSBASE. However, the remainder of the world does it the other way around with a separate TLS segment generated by the linker. Hence, it is impossible to integrate the GCC stack and pointer guard features into the mythos kernel.

Use the MSRs GSBASE and FSBASE with 64bit pointers instead of the legacy GDT entries. Load sensible values during early boot and when loading the GDT. Make an TLS section in the linker script.

rottaran avatar Sep 04 '18 14:09 rottaran

check the use of __seg_fs and __seg_gs named address spaces in clang and GCC ver>6

rottaran avatar Jul 24 '19 16:07 rottaran