https://bugs.winehq.org/show_bug.cgi?id=45667
Bug ID: 45667 Summary: League of Legends 8.15+ fails due to missing implementation of NtQueryVirtualMemory(MemoryWorkingSetExInformation) Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: awesie@gmail.com Distribution: ---
Created attachment 62094 --> https://bugs.winehq.org/attachment.cgi?id=62094 stub implementation
NtQueryVirtualMemory(MemoryWorkingSetExInformation) is used by League of Legends on Vista+. The current staging implementation is a stub that returns an error, which is insufficient.
Not an issue if Wine is running as Windows XP / 2003.
The attached patch adds a stub implementation for MemoryWorkingSetExInformation that marks every passed in address as invalid. This appears to be sufficient for the stub, but is obviously not correct.
I am not sure how to implement MemoryWorkingSetExInformation perfectly and efficiently, because it requires knowing whether a page has ever been accessed or not. I don't believe that Linux provides this information, so we would probably need to mark _all_ pages as NOACCESS, handle the fault when accessed, and mark the page as accessed.
https://bugs.winehq.org/show_bug.cgi?id=45667
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=45667
jaapbuurman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jaapbuurman@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45667
zzzzzyzz@hacari.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzzzzyzz@hacari.org
https://bugs.winehq.org/show_bug.cgi?id=45667
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang@codeweavers.com Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #1 from Zhiyi Zhang zzhang@codeweavers.com --- Confirmed
https://bugs.winehq.org/show_bug.cgi?id=45667
Léo El Amri leo@superlel.me changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leo@superlel.me
https://bugs.winehq.org/show_bug.cgi?id=45667
--- Comment #2 from Léo El Amri leo@superlel.me --- (In reply to Andrew Wesie from comment #0)
I am not sure how to implement MemoryWorkingSetExInformation perfectly and efficiently, because it requires knowing whether a page has ever been accessed or not.
Hello, I'm new here,
I'm far from being a pro at Windows internals, and I'm not very informed on API/ABI regarding memory info on Linux, but I don't understand why we have to know if a page has ever been accessed or not. Given the MSDN documentation, the information returned by NtQueryVirtualMemory are nearly the same than what we can get from /proc/*/mem. Am I wrong ?
https://bugs.winehq.org/show_bug.cgi?id=45667
Michele Renosto composizion3@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |composizion3@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=45667
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED Component|-unknown |ntdll Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/ntdll-MemoryWork | |ingSetExInformation CC| |z.figura12@gmail.com
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- I don't know how I missed this, but this is in Staging now.
https://bugs.winehq.org/show_bug.cgi?id=45667
--- Comment #4 from Andrew Wesie awesie@gmail.com --- The stub implementation has a typo: info->VirtualAttributes.Valid in dlls/ntdll/virtual.c should be p->VirtualAttributes.Valid.
https://bugs.winehq.org/show_bug.cgi?id=45667
--- Comment #5 from Andrew Wesie awesie@gmail.com --- Created attachment 64496 --> https://bugs.winehq.org/attachment.cgi?id=64496 fix typo in stub
https://bugs.winehq.org/show_bug.cgi?id=45667
David Mudrák david@mudrak.name changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |david@mudrak.name
--- Comment #6 from David Mudrák david@mudrak.name --- +1 to have the second "fix typo in stub" patch accepted in wine-staging too, given that the first one is already there.
https://bugs.winehq.org/show_bug.cgi?id=45667
Manuel mail+wine@m-reimer.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mail+wine@m-reimer.de
--- Comment #7 from Manuel mail+wine@m-reimer.de --- What would be the correct way to get the last fix ("fiy typo in stub") onto the radar of people who maintain wine-staging?
The first patch ("stub implementation") is already in wine-staging but the fix for this patch is not.
Can someone change the status of this bug, so it is visible that not all relevant patches in this bug report are staged?
Or should I create a new bug report to separate the new patch from this (already staged) bug?
https://bugs.winehq.org/show_bug.cgi?id=45667
--- Comment #8 from Zebediah Figura z.figura12@gmail.com --- Typo fix is pushed now. Don't know how I missed that one either.
https://bugs.winehq.org/show_bug.cgi?id=45667
aguertin+wine@aguertin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |48665
https://bugs.winehq.org/show_bug.cgi?id=45667
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |64d70b103d65198614973e38422 | |aec210db92360
--- Comment #9 from Gijs Vermeulen gijsvrm@gmail.com --- A modified version of the staging patch was upstreamed in https://source.winehq.org/git/wine.git/commit/64d70b103d65198614973e38422aec210db92360.
Marking FIXED.
https://bugs.winehq.org/show_bug.cgi?id=45667
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |3.14 Keywords| |obfuscation CC| |focht@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=45667
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.11.