Live data from Hacker News

macOS extensions are moving away from the kernel

eclecticlight.co

51–60 of 149 posts

Re: macOS extensions are moving away from the kernel

#51
To me, this sounds kinda like the following:

- XNU was born from a fork of the Mach microkernel

- When the microkernel hype simmered down due to them being way too slow for '90s machines, NeXT bolted on lots of chunks taken from BSD to speed up XNU

- After 20+ years, computers are fast enough to run true microkernels, so Apple is bringing them back again

So it's finally time for microkernels to shine again?

Re: macOS extensions are moving away from the kernel

#52
post #25

Earlier quoted context omitted.

The entire "ring 1" thing is highly likely false. It's been decades since I last saw anyone using the x86 ring levels and I seriously doubt XNU is using them. In any case, extensions run in the same address space as the rest of the kernel making any such "rings" pointless.

Rings 1 and 2 don't even exist on AMD64/x86-64.

Yes they do, but segmentation is practically non-existent and page tables distinguish only between rings 0 and rings 1-3. So no, they aren't very useful, but they do exist and, AFAIK, they're still checked in "far" control transfers.

Re: macOS extensions are moving away from the kernel

#53
post #42

Earlier quoted context omitted.

What a sensible world we live on nowadays, that wasn't name calling in any sense. From all purposes from a third party driver writer persona, the only path forward are user space drivers. What you call a kernel like that?

> What a sensible world we live on nowadays This is basically calling me silly, just as you were calling the previous person ideological and a pedant. If you cut out this commentary that would be great.

You are the one playing the victim here, I am not attacking anyone.

Re: macOS extensions are moving away from the kernel

#54
post #50
post #46

I hope this won't effect tools like "Karabiner Elements"[1]? It's an essential tool I use to re-program the whole keyboard. [1] https://karabiner-elements.pqrs.org/

Yeah, definitely going to be problematic if that happens.

For sure. That would mean I couldn't use a decent keyboard, and that's gonna be a show-stopper.

I don't know what happened there... Apple used to make wonderful keyboards, but it seems like every model they make now just plain sucks.

Re: macOS extensions are moving away from the kernel

#55
post #43

Earlier quoted context omitted.

"Pedantic"? If you just consider disallowing 3rd party modules to be a "microkernel" all while the kernel itself still loads most if not all (approved) drivers such as PCI bus, storage devices or filesystems in the same address space, then _all_ current major operating systems are "microkernels".

From all pratical purposes for a third party driver writer persona, the only path forward are user space drivers. What you call a kernel like that?

Non-extensible?

Locked?

"A kernel that only allows user-space third party drivers"?

That this style doesn't have a nifty name isn't a good reason to weaken the established definition of microkernel just so it does.

Re: macOS extensions are moving away from the kernel

#56
You can still find the official documents about how to make changes in the MacOS X kernel itself (dated 2004 or so...).

It's really sad that we have come to this. The platform became more and more closed off in the name of security and no serious law or regulation is preventing that.

And if at least it was bug free it would be worth it, maybe. But my kernel extensions are all for circumventing bugs or stuff that does not work properly, e.g. Karabiner for remapping the ctrl character of my keyboard to command, necessarily since I work with a lot of OSes at a time.

Re: macOS extensions are moving away from the kernel

#57

systemextensionsctl list yields 0 extensions on my system. Are there any users of these extensions at this point? It does seem a bit weird that installing these extensions supposedly doesn't require any user consent, even though stuff like screen recording or folder access does.

Little Snitch:

    % systemextensionsctl list 
    1 extension(s)
    --- com.apple.system_extension.network_extension
    enabled active teamID bundleID (version) name [state]
    * * MLZF7K7B5R at.obdev.littlesnitch.networkextension (5.2.2/6209) Little Snitch Network Extension [activated enabled]

Re: macOS extensions are moving away from the kernel

#58

You can still find the official documents about how to make changes in the MacOS X kernel itself (dated 2004 or so...). It's really sad that we have come to this. The platform became more and more closed off in the name of security and no serious law or regulation is preventing that. And if at least it was bug free it would be worth it, maybe. But my kernel extensions are all for circumventing bugs or stuff that does…

You don’t need to use Karabiner for that: keyboard preferences has a modifier keys setting (per keyboard) that achieves this exact remapping with no kernel extensions.

Re: macOS extensions are moving away from the kernel

#59
post #3

Earlier quoted context omitted.

The roadmap as presented by Apple at WWDC 2019 was that after an userspace replacement for a kernel subsystem gets presented, there is one year deprecation until it gets removed from the kernel on the following OS release. So there is one year to try out what might still be missing and give respective feedback. The long term roadmap is that macOS will eventually be much more microkernel like.

I am quite sure that we have been other this several times in HN. The fact that they're no longer going to allow loading of 3rd party kernel modules (a pure political decision) does not a make a microkernel (which is an architectural style). The kernel is still going to be big and monolithic (it contains the entire BSD kernel in the same address space!), and they're still going to be loading Apple-authorized kernel m…

> The kernel is still going to be big and monolithic (it contains the entire BSD kernel in the same address space!)

macOS does not use “the” BSD kernel (it’s not even obvious what your assertion even means since there are many members of the BSD family, each with their own kernel - none of which macOS uses).

Re: macOS extensions are moving away from the kernel

#60
post #50

Earlier quoted context omitted.

Yeah, definitely going to be problematic if that happens.

For sure. That would mean I couldn't use a decent keyboard, and that's gonna be a show-stopper. I don't know what happened there... Apple used to make wonderful keyboards, but it seems like every model they make now just plain sucks.

Perhaps you can contact the macOS team that develops this and ask them to provide some kind of hook for keyboard drivers. From experience, I can tell that the Logic team listens to its users, but it's a smaller, and highly technical user group, of course. I wouldn't know if the kernel/extensions team reacts in the same way.
Post reply on HN