Re: fs, gs purpose & multicore prog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi....

On Wed, Sep 3, 2008 at 4:21 AM, Eric Lacombe
<eric.lacombe@xxxxxxxxxxxxxxxxx> wrote:
> Hello,
>
> I've some questions about IA-32e in Linux.
>
> - What is the FS and GS segments role inside the kernel ?
> (I was thinking about thread local storage)

correct..it points to current process' start of TLS segment

> - When I do a "mov %fs ..." instruction (in a module), it seems that %fs is
> equal to 0 (idem for %gs). Are these registers not always filled ?

probably in kernel space, fs/gs has no meaning...or maybe since your
module is currently running on behalf on non TLS process, thus fs/gs
is zero.

> - What is the purpose of MSR_FS_BASE and MSR_GS_BASE ?
> (I thought they were filled with "gdt[fs_entry].base")

ehm just guessing, they were looked up when a process does SYSENTER/SYSCALL?

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux