Re: lea with fs override



JC <spamtrap@xxxxxxxxxx> wrote:
?
jongware wrote:

why not use
push fs
pop eax?


Okay, that'd be great if my OS (Windows XP) ran in real mode.

Thankfully, though, it doesn't. In protected mode, this just gives me
a segment selector. I am interested in the base linear address that
the descriptor points to. AFAIK, there's nothing useful (from
userland) I can do to figure out the base address just from the
selector.

On XP, FS points to somewhere in the range of 7FFD0000 to 7FFE0000. I'm
not sure how that helps you.

GS is set to 0. I don't mean it's a selector with a base at 0 (like DS), I
mean it is the null selector. Trying to do
mov ax, gs:[0]
will result in a GPF.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages

  • Re: [PATCH 4/21] i386 Broken bios common
    ... >>Both the APM BIOS and PnP BIOS code use a segment hack to simulate real ... >>real mode). ... Several broken BIOSen use selector 0x40 as if they were ... > Isn't this what Wine already has to work around, ...
    (Linux-Kernel)
  • Re: [PATCH 4/21] i386 Broken bios common
    ... > Both the APM BIOS and PnP BIOS code use a segment hack to simulate real ... > real mode). ... Several broken BIOSen use selector 0x40 as if they were ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: From rmode to pmode
    ... code snippit about initialize code descriptor really bothers me as I'm ... xor eax, eax ... "He" is converting the address from real mode ... mode from real mode until cs is loaded with a selector instead of a segment. ...
    (alt.lang.asm)
  • Re: [PATCH 4/21] i386 Broken bios common
    ... >>Both the APM BIOS and PnP BIOS code use a segment hack to simulate real ... >>real mode). ... Several broken BIOSen use selector 0x40 as if they were ... >know about the current TLS layout? ...
    (Linux-Kernel)
  • Re: Beware of Acronis Hanging Up Your Computer
    ... maria, the hackneyed proctologist, orated: ... Startup Manager and the OS Selector. ... disallowing you from loading Windows. ... "Please specify the Acronis Secure Zone size. ...
    (alt.os.windows-xp)