A New Kernel Patch Is Being Discussed That's Needed For Newer Windows Games On Wine

Written by Michael Larabel in Linux Kernel on 31 May 2020 at 09:25 AM EDT. 40 Comments
Newer Windows games/applications are making use of system call instructions from the application code without resorting to the WinAPI and that is breaking Wine emulation support. A Linux kernel patch is now being worked on for addressing this issue in the form of system call isolation based on memory areas while having a smaller performance hit than alternatives.

With newer Windows software executing system call instructions without going through the Windows API, Wine isn't able to intercept and emulate those system calls and thus breaking the support. Wine can't really rework its handling of every system call as that would thrash the performance. So a Linux kernel-based solution is being sorted out.

Gabriel Krisman Bertazi of Collabora, the consulting firm that does assist Valve in various Linux efforts, has posted an initial patch for the kernel's SECCOMP implementing system call isolation based on memory areas. While SECCOMP is traditionally used for Linux security matters, this implementation is being done for in-kernel filtering of system calls to figure out whether they were issued from Wine or the Windows code based on the memory area. A new virtual memory attribute is being used for tracking.

Wine developers decided against using the existing SECCOMP filtering as they found that to cause around a 10% performance penalty while making use of this isolation based on memory areas amounted to around a 1.5% performance hit.

The patch implementing this SECCOMP feature amounts to just under one hundred lines of code and is currently sent out via a "request for comments" flag this weekend on the kernel mailing list where the approach is currently being discussed. Though given the timing of this work, it's unlikely we will see the SECCOMP_MEMMAP support merged until at least Linux 5.9 later this year given the 5.8 merge window is imminent.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week