Post

Replies

Boosts

Views

Activity

IOUserClient migration from kext(registerNotificationPort)
In kext driver I'm using IOUserClient::registerNotificationPort - https://developer.apple.com/documentation/kernel/iouserclient/1400665-registernotificationport for communicate with my application. And use IODataQueue - https://developer.apple.com/documentation/kernel/iodataqueue for notification about DataAvailable in SharedMemory to my Application. My Application written by Objective-c. I haven't been able to find a way to write a scenario similar to this one in DriverKit driver. How can I migration registerNotificationPort function to dext driver? Any ideas are appreciated.
3
0
952
Aug ’20
IOUserClientMethodArguments structure* always null
I'm trying to communicate application <-> driverkit driver. In IOUserClient ExternalMethod method, IOUserClientMethodArguments->structureOutput and IOUserClientMethodArguments->structureOutputDescriptor always null. below is my code- IOUserClient -- About IOUserClientMethodDispatch Methods[1].function = myClient::myFunction; Methods[1].checkScalarInputCount = 10; Methods[1].checkStructureInputSize = kIOUserClientVariableStructureSize; Methods[1].checkScalarOutputCount = 10; Methods[1].checkStructureOutputSize = kIOUserClientVariableStructureSize; - MyApplication -- uint64_t ScalarIn[10]; uint64_t ScalarOut[10]; uint16_t SturctureOut = 0; size_t StructureOutSize = sizeof(uint16_t); kern_return_t kRet = IOConnectCallMethod(Device, 1, ScalarIn, 10, NULL, 0, ScalarOut, 10, &StructureOut, (size_t*)&StructureOutSize); IOConnectCallMethod return Success. But In Client ExternalMethod, structureOutput and structureOutputDescriptor always null. structureOutputMaximumSize is correct. Does anyone can help, how can i pass structure param correctly?
1
0
610
Aug ’20
IOUserNetworkPacket GetDataLength is failed with kIOReturnBadArgument in Mac Big Sur
Hi I'm developing USB network driver with NetworkingDriverKit. develop environment MacOS 10.15.4 XCode 11.6 My USB Networking Driver works fine in MacOS 10.15. But in MacOS 11(Big Sur) GetDataLength method in IOUserNetworkPacket class always failed with kIOReturnBadArgument . IOUserNetworkPacket get from txSubmissionQueue. GetDataLength Document link : https://developer.apple.com/documentation/networkingdriverkit/iousernetworkpacket/3294975-getdatalength And my code similar below IOUserNetworkPacket *packet; uint32_t packetLength = 0; ret = txSubmissionQueue->DequeuePacket(&packet);- if success ret = packet->GetDataLength(&packetLength); // ret always kIOReturnBadArgument in Big Sur Does anyone have any ideas on how I can solve this?
1
0
672
Aug ’20
driverkit usb driver fails with code signature error
When I develop the usb driver, activate app & usb driver load successfully.(SIP disabled) But after SIP enable can't load usb driver with code signature error. Exception Type: EXCCRASH (Code Signature Invalid) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXCCORPSE_NOTIFY Termination Reason: Namespace CODESIGNING, Code 0x1 codesign validate looks find. Usb driver with activateApp is notarized. codesign -vvv /ActivateApp.app/Content/Library/SystemExtensions/MyUSBdriver.dext /ActivateApp.app/Content/Library/SystemExtensions/MyUSBdriver.dext: valid on disk /ActivateApp.app/Content/Library/SystemExtensions/MyUSBdriver.dext: satisfies its Designated Requirement codesign -d -vvv --entitlement :- /ActivateApp.app/Content/Library/SystemExtensions/MyUSBdriver.dext Executable=/ActivateApp.app/Content/Library/SystemExtensions/MyUSBdriver Identifier=com.devguru.DriverKit.MyUSBdriver Format=bundle with Mach-O thin (x86_64) CodeDirectory v=20400 size=586 flags=0x0(none) hashes=9+5 location=embedded Hash type=sha256 size=32 CandidateCDHash sha256=32172e957bb8d78c6293871b18f5c50838617025 CandidateCDHashFull sha256=32172e957bb8d78c6293871b18f5c50838617025db9d9b62ab4fb0e2892e5c07 Hash choices=sha256 CMSDigest=32172e957bb8d78c6293871b18f5c50838617025db9d9b62ab4fb0e2892e5c07 CMSDigestType=2 CDHash=32172e957bb8d78c6293871b18f5c50838617025 Signature size=8972 Authority=Developer ID Application: DEVGURU Co., Ltd. (EZ5B6482X4) Authority=Developer ID Certification Authority Authority=Apple Root CA Timestamp=Aug 10, 2020 10:39:40 AM Info.plist entries=22 TeamIdentifier=EZ5B6482X4 Sealed Resources version=2 rules=10 files=1 Internal requirements count=1 size=200 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.driverkit</key> <true/> <key>com.apple.developer.driverkit.transport.usb</key> <array> <dict> <key>idVendor</key> <integer>1234</integer> </dict> </array> </dict> </plist> security cms -D -i /ActivateApp.app/Content/Library/SystemExtensions/MyUSBdriver.dext/embedded.provisionprofile <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Platform</key> <array> <string>OSX</string> </array> <key>IsXcodeManaged</key> <false/> <key>DeveloperCertificates</key> <array> <data>..</data> </array> <key>Entitlements</key> <dict> <key>com.apple.developer.driverkit</key> <true/> <key>com.apple.developer.driverkit.family.networking</key> <true/> <key>com.apple.developer.driverkit.family.serial</key> <true/> <key>com.apple.developer.system-extension.install</key> <true/> <key>com.apple.application-identifier</key> <string>EZ5B6482X4.com.devguru.DriverKit.MyUSBdriver</string> <key>keychain-access-groups</key> <array> <string>EZ5B6482X4.*</string> </array> <key>com.apple.developer.team-identifier</key> <string>EZ5B6482X4</string> <key>com.apple.developer.driverkit.transport.usb</key> <array> <dict> <key>idVendor</key> <integer>1234</integer> </dict> </array> </dict> .. <key>ProvisionsAllDevices</key> <true/> <key>TeamIdentifier</key> <array> <string>EZ5B6482X4</string> </array> <key>TeamName</key> <string>DEVGURU Co., Ltd.</string> <key>TimeToLive</key> <integer>6570</integer> <key>UUID</key> <string>8a07f2be-df46-439f-8ab0-7c3712f72533</string> <key>Version</key> <integer>1</integer> </dict> </plist>% Does anyone have any ideas why can't load driver usb driver?
0
0
694
Aug ’20
Activate driver extension failed "OSSystemExtensionErrorDomain Code=8"
HiI have downloaded the sample code from "https://github.com/knightsc/USBApp".I'm trying to activate driver extension, but activationRequest always fail with "OSSystemExtensionErrorDomain Code=8" error.------ error message------sysex didFailWithError Error Domain=OSSystemExtensionErrorDomain Code=8"Invalid code signature or missing entitlements" UserInfo={NSLocalizedDescription=Invalid code signature or missing entitlements}--------------------------------A related entilement request has been sent, but no response has been received.So I edit "com.apple.developer.driverkit" value to "NO" on entitlement file for compile the code.I've modifies code about driver extension identifier and device information for my device.After compile the code, driver extension and USBApp codesign with Developer Application ID.(If codesign is not done, when launching USBApp crash occurred with Signing problem.)Also i did disable SIP.What am I missing?Any help in solving this problem would be greatly appreciated.
1
0
850
Mar ’20