64-bit TEB on WoW64

Andrew Wesie awesie at gmail.com
Sun May 19 16:58:06 CDT 2019


On Sun, May 19, 2019 at 4:07 PM Ken Thomases <ken at codeweavers.com> wrote:
>
> Perhaps 4: use a different code segment so that the %cs segment selector doesn't look like a WoW64 environment.  Kind of specific to this particular app's behavior, so not great, but maybe passable.
>

This possibility was considered but I didn't think it was possible to
do this on Linux any more without patching the kernel. Notably from
the man page for set_thread_area: "Since Linux 3.19, set_thread_area()
cannot be used to write non-present segments, 16-bit segments, or code
segments, although clearing a segment is still acceptable." The
associated source code:
https://elixir.bootlin.com/linux/v3.19/source/arch/x86/kernel/tls.c#L63.

Please let me know if my understanding is incorrect.



More information about the wine-devel mailing list