Hacker News new | past | comments | ask | show | jobs | submit login

This is interesting. So basically, my understanding is that the Posix subsystem is just a user mode portion of Windows that translates API calls to calls into Executive services through ntdll.dll

Now this means that if you know the ntdll.dll interface then this remains stable. So if you want to develop your own environmental subsystem it should be possible. After all, the Posix subsystem was purchased by Microsoft!

What I'm really interested in is what the ReactOS guys are doing. Have they implemented the same layering? If they have implemented ntdll.dll, then this could actually mean that they could technically get in ahead and do what Microsoft are doing right now.

For that matter, it starts to make me wonder whether someone could do what Microsoft have done but in reverse on Linux! In other words, implement a translation layer that translate ntdll.dll function calls to corresponding kernel syscalls, then work backwards implementing each of the user mode subsystems. Maybe WINE has done this already?




Up until Win7 the Win32 subsystem wasn't entirely in userland. In Vista they started the MinWin kernel initiative to extricate it but I don't know if that's full come to fruition in Windows 10.

If it has then you could theoretically write a WinNT interface for Linux and run the Win32 userland on it. But that's pretty much asking Microsoft to sue you into oblivion.

* According to Wikipedia, the MinWin project started after Server 2003 shipped.


Wouldn't Microsoft have sued the ReactOS guys then?


No, ReactOS is an implementation of the Win32 API, not the WinNT kernel.

There's a layer of separation between WinNT and Win32 that's basically an API. In theory if you implemented this API, then you could run Microsoft's Win32 subsystem on your API without Microsoft's underlying WinNT kernel. That Win32 layer would be Microsoft code and they'd sue the heck out of you for running it.

The WinNT kernel was originally designed so that Subsystems would run on top of it and those Subsystems would provide the interfaces for applications. Originally WinNT had Win32, OS/2 and POSIX subsystems that ran on top of it. Over time the distinction between WinNT and Win32 erroded while the OS/2 subsystem was canned and the POSIX one neglected.

Starting after Server 2003 they began to redefine the boundary between WinNT and Win32. The primary reason was to allow for headless Servers that didn't have the overhead of the GUI (Win32) or other unnecessary functionality like the Printer systems.


That's entirely wrong. ReactOS implements the subsystems that allow drivers to run and a whole bunch more besides.

If you don't believe me, then I refer you to the following:

https://github.com/mirror/reactos/tree/master/reactos/dll/nt...

The Wiki itself states that:

"The ReactOS project reimplements a state-of-the-art and open NT-like operating system based on the NT architecture. It comes with a WIN32 subsystem, NT driver compatibility and a handful of useful applications and tools."

https://www.reactos.org/wiki/ReactOS

You might also want to review:

https://www.reactos.org/wiki/Ntoskrnl.exe

And also:

https://www.reactos.org/wiki/ReactOS_Core

And here is the header for the kernel functions used in ntdll.h:

https://github.com/mirror/reactos/blob/master/reactos/includ...


For that matter, it starts to make me wonder whether someone could do what Microsoft have done but in reverse on Linux! In other words, implement a translation layer that translate ntdll.dll function calls to corresponding kernel syscalls, then work backwards implementing each of the user mode subsystems. Maybe WINE has done this already?

I thought that was what WINE did. WINE = WINE Is Not an Emulator.


The Linux kernel in its current design is not intended to provide subsystems for other operating systems while the NT kernel was from beginning on.




Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: