Messages in this thread | | | Date | Wed, 19 Nov 2008 13:06:14 -0800 | From | Jeremy Fitzhardinge <> | Subject | Re: [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
| |