lkml.org 
[lkml]   [2008]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [x86] do_arch_prctl - bug?
Eric Lacombe wrote:
> Ok, thanks, so I suppose now that only doing :
> asm volatile("movl %0,%%gs" :: "r" (0));
> could corrupt the address of the PDA that resides actually in the MSR_GS_BASE.
> And that's why load_gs_index is used as it contains "swapgs" before and after
> the "mov to gs".
>
> Is that correct?
>

Yes, loading a selector into a segment register will load the lower 32
bits of the base from the ldt/gdt into the msr and zero the rest.

J


\
 
 \ /
  Last update: 2008-11-19 22:09    [W:0.057 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site