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

Tejun Heo
2009-08-03T01:01:57Z

Hello,

H. Peter Anvin wrote:
> You can't actually do "lea %gs:foo,%rbx" (lea doesn't include the
> segment offset, unfortunately; I asked AMD to change that on 64 bits
> but, not too surprisingly, they weren't able to make that change.)
> Getting the address is expensive, but it's obviously possible -- which
> may have similar bad results. It would be worth experimenting with a
> little bit, though.

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?

Thanks.

--
tejun