← Back to context

Comment by asveikau

20 hours ago

I was at Microsoft during the Windows 8 cycle. I remember hearing about a kernel feature I found interesting. Then I found linux had it for a few years at the time.

I think the reality is that Linux is ahead on a lot of kernel stuff. More experimentation is happening.

Linux is behind Windows wrt (Hybrid) Microkernel vs Monolith, which helps with having drivers and subsystems in user mode and support multiple personalities (Win32, POSIX, OS/2 and WSL subsystems). Linux can hot‑patch the kernel, but replacing core components is risky and drivers and filesystems cannot be restarted independently.

I was surprised to hear that Windows just added native NVMe which Linux has had for many years. I wonder if Azure has been paying the SCSI emulation tax this whole time.

And behind on a lot of stuff. The Microsoft's ACLs are nothing short of one of the best designed permission systems there are.

On the surface, they are as simple as Linux UOG/rwx stuff if you want it to be, but you can really, REALLY dive into the technology and apply super specific permissions.

  • And they work on everything. You can have a mutex, a window handle or a process protected by ACL.

  • The file permission system on Windows allows for super granular permissions, yes; administrating those permissions was a massive pain, especially on Windows file servers.

  • > The Microsoft's ACLs are nothing short of one of the best designed permission systems there are.

    You have a hardened Windows 11 system. A critical application was brought forward from a Windows 10 box but it failed, probably a permissions issue somewhere. Debug it and get it working. You can not try to pass this off to the vendor, it is on you to fix it. Go.

    • Is this a trick question, because you run it as administrator in a sandboxed account.

    • Procmon.exe. Give me 2 minutes. You make it sound like it's such a difficult thing to do. It literally will not take me more than 2 minutes to tell you exactly where the permission issue is and how to fix it.

      3 replies →

  • Do you have any favorite docs or blogs on these? Reading about one of the best designed permissions systems sounds like a fun way to spend an afternoon ;)

  • You have ACLs on linux too

    • ACLs in Linux were tacked on later; not everything supports them properly. They were built into Windows NT from the start and are used consistently across kernel and userspace, making them far more useful in practice.

      Also, as far as I know Linux doesn't support DENY ACLs, which Windows does.

      6 replies →

    • Haha, sure. Sorry, it's not you, it's the ACLs (and me nerves). Have you tried configuring NFSv4 ACLs on Linux? Because kernel devs are against supporting them, you either use some other OS or have all sorts of "fun". Also, not to be confused with all sorts of LSM based ACLs... Linux has ACLs in the most ridiculous way imaginable...

  • Oh yeah for sure. Linux is amazing in a computer science sense, but it still can't beat Windows' vertically integrated registry/GPO based permissions system. Group/Local Policy especially, since it's effectively a zero coding required system.

    Ubuntu just recently got a way to automate its installer (recently being during covid). I think you can do the same on RHEL too. But that's largely it on Linux right now. If you need to admin 10,000+ computers, Windows is still the king.

    • Debian (and thus Ubuntu) has full support for automated installs since the 90's. It's built into `dpkg` since forever. That include saving or generating answer to install time questions, PXE deployment, ghosting, CloudInit and everything. Then stuff like Ansible/Puppet have been automating deployment for a long time too. They might have added yet another way of doing it, but full stack deployment automation has been there for as long as Ubuntu existed.

    • > Ubuntu just recently got a way to automate its installer (recently being during covid).

      Preseed is not new at all:

      https://wiki.debian.org/DebianInstaller/Preseed

      RH has also had kickstart since basically forever now.

      I've been using both preseeds and kickstart professionally for over a decade. Maybe you're thinking of the graphical installer?

    • > Ubuntu just recently got a way to automate its installer (recently being during covid). I think you can do the same on RHEL too. But that's largely it on Linux right now. If you need to admin 10,000+ computers, Windows is still the king.

      What?! I was doing kickstart on Red Hat (want called Enterprise Linux back then) at my job 25 years ago, I believe we were using floppies for that.

      1 reply →

    • > Ubuntu just recently got a way to automate its installer (recently being during covid). I think you can do the same on RHEL too. But that's largely it on Linux right now. If you need to admin 10,000+ computers, Windows is still the king.

      1. cloud-init support was in RHEL 7.2 which released November 19, 2015. A decade ago.

      2. Checking on Ubuntu, it looks like it was supported in Ubuntu 18.04 LTS in April 2018.

      3. For admining tens of thousands of servers, if you're in the RHEL ecosystem you use Satellite and it's ansible integration. That's also been going on for... about a decade. You don't need much integration though other than a host list of names and IPs.

      There are a lot of people on this list handling tens of thousands or hundreds of thousands of linux servers a day (probably a few in the millions).

yeah, but you have IO Completion Ports…

IO_Uring is still a pale imitation :(

  • IOCP is great and was ahead of Linux for decades, but io_uring is also great. It's a different model, not a poor copy.

    • I think they are a bit different - in the Windows kernel, all IO is asynchronous on the driver level, on Linux, it's not.

      io_uring didn't change that, it only got rid of the syscall overhead (which is still present on Windows), so in actuality they are two different technical solutions that affect different levels of the stack.

      In practice, Linux I/O is much faster, owing in part to the fact that Windows file I/O requires locking the file, while Linux does not.

      2 replies →

  • If that were true then presumably Microsoft wouldn't have ported it to Windows:

    https://learn.microsoft.com/en-us/windows/win32/api/ioringap...

    Although Windows registered network I/O (RIO) came before io_uring and for all I know might have been an inspiration:

    https://learn.microsoft.com/en-us/previous-versions/windows/...

    • That argument holds no water. IOUring is essential for the performance of some modern POSIX programs.

      You can see shims for fork() to stop tanking performance so hard too. IOUring doesnt map at all onto IOCP, at least the windows subtitute for fork has “ZwCreateProcess“ to work from. IOUring had nothing.

      IOCP is much nicer from a dev point of view because your program can be signalled when a buffer has data on it but also with the information of how much data, everything else seems to fail at doing this properly.

      1 reply →

Yeah and Linux is waaay behind in other areas. Windows had a secure attention sequence (ctrl-alt-del to login) for several decades now. Linux still doesn't.

  • Linux (well, more accurately, X11), has had a SAK for ages now, in the form of the CTRL+ALT+BACKSPACE that immediately kills X11, booting you back to the login screen.

    I personally doubt SAK/SAS is a good security measure anyways. If you've got untrusted programs running on your machine, you're probably already pwn'd.

    • That's not a SAK, you can disable it with setxkbmap. A SAK is on purpose impossible to disable, and it exists on Linux: Alt+SysRq+K.

      Unfortunately it doesn't take any display server into consideration, both X11 and Wayland will just get killed.

      2 replies →

    • The "threat model" (if anyone even called it that) of applications back then was bugs resulting in unintended spin-locks, and the user not realizing they're critically short on RAM or disk space.

    • This setup came from the era of Windows running basically everything as administrator or something close to it.

      The whole windows ecosystem had us trained to right click on any Windows 9X/XP program that wasn’t working right and “run as administrator” to get it to work in Vista/7.

  • Is that something Linux needs? I don’t really understand the benefit of it.

    • The more powerful form is the UAC full privilege escalation dance that Win 7+(?) does, which is a surprisingly elegant UX solution.

         1. Snapshot the desktop
         2. Switch to a separate secure UI session
         3. Display the snapshot in the background, greyed out, with the UAC prompt running in the current session and topmost
      

      It avoids any chance of a user-space program faking or interacting with a UAC window.

      Clever way of dealing with the train wreck of legacy Windows user/program permissioning.

      3 replies →

    • It made a lot more sense in the bygone years of users casually downloading and running exe's to get more AIM "smilies", or putting in a floppy disk or CD and having the system autoexec whatever malware the last user of that disk had. It was the expected norm for everybody's computer to be an absolute mess.

      These days, things have gotten far more reasonable, and I think we can generally expect a linux desktop user to only run software from trusted sources. In this context, such a feature makes much less sense.

    • It's useful for shared spaces like schools, universities and internet cafes. The point is that without it you can display a fake login screen and gather people's passwords.

      I actually wrote a fake version of RMNet login when I was in school (before Windows added ctrl-alt-del to login).

      https://www.rmusergroup.net/rm-networks/

      I got the teacher's password and then got scared and deleted all trace of it.