Re: [GIT PULL] Additional x86 fixes for 2.6.31-rc5

From: Linus Torvalds
Date: Sun Aug 02 2009 - 21:16:16 EST




On Mon, 3 Aug 2009, Tejun Heo wrote:
>
> Yeap, this part is strange. I can't understand why it was done that
> way. Interestingly, the segment override doesn't trigger any
> exception, it just gets ignored. Is there a way to retrieve %gs value
> without accessing memory? ie. other than %gs:identity_gs?

No. There's a "load segment limit" instruction, but not a base one. It's
intentional - segments are supposed to be "anonymous" in protected mode
(in real more of vm86 mode, the base is normally the segment register
shifted left by four of course, but even that isn't _strictly_ always
true).

You're very much not supposed to look at the base.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/