[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49247FC6.8080201@goop.org>
Date: Wed, 19 Nov 2008 13:06:14 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Eric Lacombe <goretux@...il.com>
CC: Arjan van de Ven <arjan@...radead.org>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists