charm icon indicating copy to clipboard operation
charm copied to clipboard

Use Linux FSGSBASE support for TLSglobals privatization

Open stwhite91 opened this issue 3 years ago • 0 comments

Linux v5.9 has new support for the FSGSBASE family of instructions which allow reading and writing the TLS segment pointer that we swap in TLSglobals privatization. We currently depend on support for the compiler option "-mno-tls-direct-seg-refs" to disable compiler optimizations that avoid looking up through that pointer every thread_local variable reference. Using these new instructions would improve the portability of TLSglobals.

[1] https://kernel.org/doc/html/next/x86/x86_64/fsgs.html [2] https://www.phoronix.com/scan.php?page=news_item&px=FSGSBASE-For-Linux-5.9

stwhite91 avatar Jun 21 '21 20:06 stwhite91