title: thread fs segment register switching between user and kernel land
body: <p>How does the fs segment register point to the TEB and KPCR. Are these data structures saved on the threads user and kernel stack? So is it a case of when a thread context switch takes place from user to kernel, the fs segment reg containing a pointer the TEB is saved onto the threads user stack and then the kernel fs segment register which points to the KPCR is loaded back into fs segment register? Is this how the fs segment register points to both TEB and KPCR?</p>