https://bugs.winehq.org/show_bug.cgi?id=44817
Bug ID: 44817 Summary: Some software protection schemes need ntdll.NtSetLdtEntries implementation Product: Wine Version: 3.4 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
to track https://github.com/wine-staging/wine-staging/tree/master/patches/ntdll-NtSet...
The stub was added with bug 26268 ("Multiple applications need ntdll.ZwSetLdtEntries stub (kwiksupport.me, Ragnarok Online patcher)").
Unfortunately there is no further information/details *which* copy-protection scheme needs and actual implementation. No applications/games are mentioned.
--- quote --- 1. Some copy protections call NtSetLdtEntries(0x000f) and then with 'retf' instruction jump to that selector expecting that it works (the tests show that NtSetLdtEntries(0x000f,0x001f) should succeed). In order to make this work a limitation to set only selectors > LDT_FIRST_ENTRY (512) in wine_ldt_set_entry() was removed.
2. wine_ldt_set_entry() was made to always mark modified selector entries as WINE_LDT_FLAGS_ALLOCATED, otherwise get_selector_entry() server call returns entries without that flag set and NtQueryInformationThread(ThreadDescriptorTableEntry) fails. --- quote ---
$ wine --version wine-3.4
Regards