Emulating Windows system calls in Linux

joone의 이미지

WINE아니라 또는 WINE를 통해 직접 윈도 애플리케이션 바이너리를 리눅스 커널에서 에뮬레이션하려는 움직이 있어서 관련 정보를 공유합니다. WINE에서 게임 성능을 올리기 위해 어떤 분이 이런 아이디어를 낸 것 같은데, 다양한 아이디어가 올라와서 아직은 뭔가 방향이 정해진 것 같지는 않습니다.

The idea of handling system calls differently depending on the origin of each call in the process's address space is not entirely new. OpenBSD, for example, disallows system calls entirely if they are not made from the system's C library as a security-enhancing mechanism. At the end of May, Gabriel Krisman Bertazi proposed a similar mechanism for Linux, but the objective was not security at all; instead, he is working to make Windows games run better under Wine. That involves detecting and emulating Windows system calls; this can be done through origin-based filtering, but that may not be the solution that is merged in the end.
To run with any speed at all, Wine must run Windows code directly on the CPU to the greatest extent possible. That must end, though, once the Windows program makes a system call; trapping into the Linux kernel with the intent of making a Windows system call is highly unlikely to lead to good results. Traditionally, Wine has handled this by supplying its own version of the user-space Windows API that implemented the required functionality using Linux system calls. As explained in the patch posting, though, Windows applications are increasingly executing system calls directly rather than going through the API; that makes Wine unable to intercept them.

출처: https://lwn.net/Articles/824380/