1. A method comprising: obtaining a head pointer for a kernel thread of a user space process from a kernel space of a processing system, wherein the head pointer points to a set of thread local variables (TLVs) of the kernel thread of the user space process; storing the head pointer in a global data structure of the user space process at an index into the global data structure, based at least in part on a portion of an address of a stack for the kernel thread in a process stack maintained by an operating system (OS); obtaining the stack address for the kernel thread of the user space process; retrieving the head pointer from the global data structure by using the portion of the stack address as the index to retrieve the head pointer from the global data structure without causing the processing system to execute any kernel system calls; and using the head pointer retrieved from the global data structure to access a TLV associated with the kernel thread of the user space process.