Neptune OS: a WinNT personality of the seL4 microkernel

Neptune OS is a Windows NT personality of the seL4 microkernel. It implements what Microsoft calls the “NT Executive”, the upper layer of the Windows kernel NTOSKRNL.EXE, as a user process under the seL4 microkernel. The NT Executive implements the so-called NT Native API, the native system call interface of Windows upon which the more familiar Win32 API is built. These are exposed to the user mode via stub functions in NTDLL.DLL (a somewhat redundant name if you ask me) with names such as NtCreateProcess. The NT Executive is also responsible for the Windows kernel driver interface (known as the Windows driver model), which includes functions like IoConnectInterrupt and IoCallDriver. On Windows these are loaded into kernel mode and linked with the NTOSKRNL.EXE image. On Neptune OS, we run all the Windows kernel driver in user mode and they communicate with the NT Executive process via standard seL4 IPC primitives.

The eventual goal of the Neptune OS project is to implement enough NT semantics such that a ReactOS user land can be ported under Neptune OS, as well as most ReactOS kernel drivers. In theory we should be able to achieve binary compatibility with native Windows executables provided that our implementation of the NT Native API is sufficiently faithful. We should also be able to achieve a high degree of source code compatibility with Windows kernel drivers. The main obstacle of achieving binary compatibility of kernel drivers is that many Windows kernel drivers do not follow the standard Windows driver communication protocol (ie. passing IRPs when you need to call another driver) and instead just pass pointers around and call into other drivers directly. In Neptune OS unless it’s a driver-minidriver pair we always run “kernel” drivers in their separate processes so it is not possible to do that.

Very cool idea for a project, and awesome to see that they plan on integrating the work done by the ReactOS team.

18 Comments

  1. 2022-02-24 1:28 pm
    • 2022-02-25 3:34 pm
    • 2022-03-01 7:27 pm
  2. 2022-02-25 6:33 am
    • 2022-02-26 7:01 am
  3. 2022-02-25 7:38 am
    • 2022-02-26 7:17 am
    • 2022-02-26 11:28 am
  4. 2022-02-25 2:34 pm
    • 2022-02-25 3:11 pm
    • 2022-02-26 7:12 am
      • 2022-02-28 9:46 am
  5. 2022-02-25 6:21 pm
    • 2022-02-26 7:04 am
      • 2022-02-26 12:01 pm
        • 2022-03-02 2:44 pm
          • 2022-03-02 3:13 pm