kernel-extension

Can't sign kext in Mavericks/Yosemite?

纵然是瞬间 提交于 2019-12-03 03:30:59
Goal: to sign my own packages, and my own kernel extensions. "My own" in the context means "that I wrote, or that I picked elsewhere, recompiled myself from their sources, and want to install on my machine. Problem: Mavericks does not accept my signature with Code Signing Failure: code signature is invalid (but loads the kext), Yosemite won't even load it. I have my own CA, and code-signing certs. I've been able to successfully sign code and set up policies that would allow code signed by the given certs to be installed and executed - both codesign and spctl like it, as you see in the output

Why doesn't this keyboard intercepting kernel extension work?

馋奶兔 提交于 2019-12-02 20:58:46
my fellow developers! I hope very much that at least some of you will not get frightened by the amount of text this question contains (I simply did my best to be as descriptive as humanely possible). :) To those who think I've asked this question to write malware or something. I want to write an application that will allow users to select applications to be launched after the OS will finish launching. The whole idea is to allow user to select these apps BEFORE the OS finished launching by pressing hotkeys previously binded to the apps. For example user turns on his Mac, types SMTV and goes

Using Kauth API in MacOS kernel extension

こ雲淡風輕ζ 提交于 2019-12-02 15:42:47
问题 I'm trying to monitor file copying to external USB drives in a kext. This is how I implemented: Call kauth_listen_scope() to register a listener for KAUTH_SCOPE_VNODE. When I receive a KAUTH_VNODE_READ_DATA event on local drive, I will put the file information in a queue for record. When I receive a KAUTH_VNODE_WRITE_DATA event on external drives, I will search the queue in reverse order. If I found a matching, I will send this file information to a user space daemon for checking, then return

Thread should wait for commplete the device request in kext programming

坚强是说给别人听的谎言 提交于 2019-12-02 12:51:25
I am developing a device driver on mac. my question is how can we make a device request asynchronous to synchronous. like i send a send encapsulated command to device and get it response using get encapsulated command after getting a notification on interrupt pipe. so how can i make my thread will wait until all above request is not completed (both send and get) . You'll probably have to be a bit more specific than that. But in general, if you need a thread to sleep until some function of yours is called on another thread, you can use xnu's event system. As this is a device driver, I assume

Using Kauth API in MacOS kernel extension

可紊 提交于 2019-12-02 10:51:53
I'm trying to monitor file copying to external USB drives in a kext. This is how I implemented: Call kauth_listen_scope() to register a listener for KAUTH_SCOPE_VNODE. When I receive a KAUTH_VNODE_READ_DATA event on local drive, I will put the file information in a queue for record. When I receive a KAUTH_VNODE_WRITE_DATA event on external drives, I will search the queue in reverse order. If I found a matching, I will send this file information to a user space daemon for checking, then return KAUTH_RESULT_DENY if the file shouldn't be copied out. Everything works fine based on individual files

Linking Dylibs in Kexts?

て烟熏妆下的殇ゞ 提交于 2019-12-02 03:36:53
问题 I've written a kext for OS X that implements a USB-based framebuffer using (IOKit) libusb and jpeglib. Both of those are dylibs, and for some reason they won't link properly in XCode, and the OS won't resolve the dependencies when it attempts to load the kext. The background of this whole thing is that Samsung makes an LCD picture frame that can act as a second monitor; the only problem is that it's not DisplayLink or any other known protocol -- the Windows-only driver spits out a custom

Linking Dylibs in Kexts?

烂漫一生 提交于 2019-12-02 03:35:16
I've written a kext for OS X that implements a USB-based framebuffer using (IOKit) libusb and jpeglib. Both of those are dylibs, and for some reason they won't link properly in XCode, and the OS won't resolve the dependencies when it attempts to load the kext. The background of this whole thing is that Samsung makes an LCD picture frame that can act as a second monitor; the only problem is that it's not DisplayLink or any other known protocol -- the Windows-only driver spits out a custom header and each frame is encoded as a JPEG and sent to the device. My implementation does that for OS X,

How to write usb touchscreen driver kext in os x 10.9?

大兔子大兔子 提交于 2019-12-01 11:58:38
I want to write a usb touchscreen kext for usb touch screen . I have read the Kernel Extension Programming Topics and the I/O Kit Fundamentals etc, My question is, 1 . how to get the input report messages from touch screen ? 2 . how to post the coordinate info to system ? I have no idea, anybody help? It depends on the hardware; moreover, this question is quite broad - you'll need to be more specific in your question to get more specific answers. I'll try to provide a broad overview: A touchscreen has 2 parts: Output: showing the image coming from the computer on the display Input: the touch

Can't Unload Kernel Extension; Classes Have Instances

老子叫甜甜 提交于 2019-11-30 18:29:50
I'm writing an OSX kernel extension for an audio device driver (it's software, but emulates a hardware device). During development, it'd be convenient to completely uninstall existing old versions and then build and install the new version from scratch. However, this occasionally seems to not be possible without a system restart. The program itself is not running and the source files have been deleted from the /System/Library/Extensions/ dir. But kextstat reveals a single instance: $ kextstat | grep 'com.foo.driver.bar' 219 0 0xfff123 0x5000 0x5000 com.foo.driver.bar (0.0.1) <102 5 4 3> (..

Can't Unload Kernel Extension; Classes Have Instances

时间秒杀一切 提交于 2019-11-30 02:57:17
问题 I'm writing an OSX kernel extension for an audio device driver (it's software, but emulates a hardware device). During development, it'd be convenient to completely uninstall existing old versions and then build and install the new version from scratch. However, this occasionally seems to not be possible without a system restart. The program itself is not running and the source files have been deleted from the /System/Library/Extensions/ dir. But kextstat reveals a single instance: $ kextstat