4 ms·
Can you please elaborate on this "Wine in reverse" concept?
by severino 6y ago
Can you please elaborate on this "Wine in reverse" concept?
- lxgr 6y agoI'm talking about a userspace-only Linux compatibility layer for Windows. As far as I understand, Wine (a userspace-only Win32 emulator) is possible because Windows applications always go through the standard library for system calls, which therefore can be hooked without kernel support. The same is not generally true for Linux binaries – these usually do go through glibc, but direct syscalls are possible (through raising the appropriate interrupt or instruction). I don't think there's an easy way to trap these without kernel support (which is what WSL 1 has been doing).
- masklinn 6y ago> The same is not generally true for Linux binaries – these usually do go through glibc, but direct syscalls are possible (through raising the appropriate interrupt or instruction). OTOH Linux having a well defined set of syscalls you can very convincingly fake being a Linux kernel. That’s what wsl1 did. That’s also what SmartOS does, which allows it to mix native and Linux (LX) zones.
- lxgr 6y agoDefinitely, iSH does the same thing on iOS and it works really well. But I don't see why we can't have both (a stable syscall interface and requiring all syscalls to go through a standard library).
- masklinn 6y ago> But I don't see why we can't have both (a stable syscall interface and requiring all syscalls to go through a standard library). What's the point of having a stable syscall interface when you can require that only libc perform syscalls?
- severino 6y ago> I don't think there's an easy way to trap these without kernel support (which is what WSL 1 has been doing). Thanks four your explanation. So is WSL2 different in this regards?