64-bit TEB on WoW64

Zebediah Figura z.figura12 at gmail.com
Sun May 19 17:41:56 CDT 2019


On 5/19/19 4:58 PM, Andrew Wesie wrote:
> 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.
> 
> 

Presumably we could use the LDT [and modify_ldt(2)] instead, as we 
already do for NE segmentation?



More information about the wine-devel mailing list