Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DriverKit Port #139

Open
sgulls opened this issue Apr 22, 2021 · 7 comments
Open

DriverKit Port #139

sgulls opened this issue Apr 22, 2021 · 7 comments

Comments

@sgulls
Copy link

sgulls commented Apr 22, 2021

Clearly the writing is on the wall for KEXTs. We can get away with it for now by running bputil -k in 1TR for arm Macs but sooner or later KEXTs are going to go the way of 32 bit support and it's clear the original developer/maintainer cannot/will not port the code so it's up to us honestly.

I'm not that experienced with Obj-C and I've played around with the code but not everything has a drop in replacement from kernel IOKit to DriverKit so I'm in way over my head.

among some libraries/headers that I'm figuring out how to replace

In the headers file:
IOKit/usb/IOUSBHostFamily.h
IOKit/network/IOEthernetController.h & IOKit/network/IOEthernetController.h (I guess IOUserNetworkEthernet is probably the way to go but it's not quite the same)
IOKit/IOTimerEventSource.h
IOKit/IOMessage.h

in the main cpp file:
mach/kmod.h & libkern/version.h (they don't seem necessary given we're moving code away from the kernel)
IOKit/network/IOGatedOutputQueue.h

In addition, DriverKit now enumerates interfaces using a c++ class in an .iig file which handles starting, stopping and cleanup versus the kext which has everything in the .cpp body so reformatting the code will be necessary.

I only have DriverKit entitlements for a few VID/PIDs as I have to request each pair individually from Apple so I only bothered request devices I personally own. With that being said, an unsigned driver extension is vastly preferably to running in the kernel as evidenced by the kernel panics and crashes this software has wrought so far.

Anyone with any Obj-C experience willing to pitch in? I'll try learning as I go but I can't do this by myself.

@sgulls
Copy link
Author

sgulls commented Apr 22, 2021

starting my fork here

@Belcarra
Copy link

Belcarra commented Apr 25, 2021 via email

@jwise
Copy link
Owner

jwise commented Apr 25, 2021

Here's a dumb question: can you use DriverKit for the network portion, and libusb for the USB portion? For a while I was thinking that the future of HoRNDIS would be tun/tap-based for network and libusb for USB.

@krjw-eyev
Copy link

@Belcarra that sounds great! When are you planning to release it?

@sgulls I have looked at your repository and have noticed that you added code for a SwiftUI App. What was your plan? How far did you come porting it to DriverKit?

@Belcarra
Copy link

Belcarra commented Jun 10, 2021 via email

@YiquanGu
Copy link

starting my fork here

Great initiative! Is your version working on M1 Big Sur?

@vricosti
Copy link

vricosti commented Sep 22, 2022

@Belcarra Any news about this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants