> On Jun 8, 2020, at 2:53 PM, Ricardo Neri > <ricardo.neri-calde...@linux.intel.com> wrote: > > On Mon, Jun 08, 2020 at 11:14:54AM -0700, Brendan Shanks wrote: >> Add emulation/spoofing of SLDT and STR for both 32- and 64-bit >> processes. >> >> Wine users have found a small number of Windows apps using SLDT that >> were crashing when run on UMIP-enabled systems. >> >> Reported-by: Andreas Rammhold <andi@notmuch.email> >> Originally-by: Ricardo Neri <ricardo.neri-calde...@linux.intel.com> >> Signed-off-by: Brendan Shanks <bsha...@codeweavers.com> >> --- >> >> v2: Return (GDT_ENTRY_LDT * 8) for SLDT when an LDT is set. >> >> arch/x86/kernel/umip.c | 34 +++++++++++++++++++++++++--------- >> 1 file changed, 25 insertions(+), 9 deletions(-) >> >> diff --git a/arch/x86/kernel/umip.c b/arch/x86/kernel/umip.c >> index 8d5cbe1bbb3b..a85f0b0ec2b9 100644 >> --- a/arch/x86/kernel/umip.c >> +++ b/arch/x86/kernel/umip.c >> @@ -64,6 +64,8 @@ >> #define UMIP_DUMMY_GDT_BASE 0xfffffffffffe0000ULL >> #define UMIP_DUMMY_IDT_BASE 0xffffffffffff0000ULL >> >> +#define UMIP_DUMMY_TASK_REGISTER_SELECTOR 0x40 > > One more thing. How was this value selected? Would it be possible to use > GDT_ENTRY_TSS*8? Linux already uses this value.
I used 0x40 because ‘sldt’ returned that value on every system I tested. GDT_ENTRY_TSS*8 also equals 0x40 (for 64-bit capable kernels), yes I can use that instead. Thank you, Brendan Shanks CodeWeavers