Re: i486 emu in mainline?

From: Albert Cahalan
Date: Tue May 25 2004 - 14:28:55 EST


Alan Cox writes:
> On Sun, May 23, 2004 at 10:29:12AM +0200, Willy Tarreau wrote:

>> being emulated. I think it's already the case. He also
>> said that I didn't take care of the segment selectors
>> (such as SS) which some programs use perfectly legally
>> (eg Wine). I don't know how to do that.
>
> You have to parse all the valid header bytes (the opcode
> prefixes) that change segment, cause repeats and change
> sizes. DOSemu has a worked example of this particular
> set of horrors.

You don't need that in a fully general way. You might want
to detect unhandled cases and generate SIGILL.

The important thing is to correctly handle whatever is
generated by gcc, icc, glibc, uclibc, dietlibc, klibc,
and newlib. Thus you can assume that you're dealing with
a 32-bit app that doesn't play LDT games. Segment selectors
are limited to the pthreads assembly code.

Wine and DOSEMU can take care of themselves.


-
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/