osx - Kext reference from connected user-space clients -
i'm using kext provides services 1 or more user-space clients communicate using iokit service.
i'd each such client take reference on kext, wouldn't possible unload kext long there still available clients.
according documentation can use ioserviceopen
, ioconnectaddref
, it's still possible unload driver using kextunload
.
kextstat
shows no references taken on driver, references other drivers mentioned in documentation, thought above commands trick.
index refs address size wired name (version) uuid <linked against> 1 100 0xffffff7f80a46000 0x9d90 0x9d90 com.apple.kpi.bsd (16.7.0) 410b3b98-9dab-4590-9086-7c57a5b3099a 2 8 0xffffff7f80fc3000 0x3940 0x3940 com.apple.kpi.dsep (16.7.0) fa744b47-913c-4b5d-8c16-2f8005d85935 3 127 0xffffff7f80a04000 0x21040 0x21040 com.apple.kpi.iokit (16.7.0) 80f2da67-c67b-4583-9b09-082db11f69fc ... 170 0 0xffffff7f80a04000 0x21040 0x32120 com.my-driver.nsl (1.0.0) 53390ccd-55f0-315f-bbd7-21645800e4a0
what should in order increase #refs above chart ?
edit: in apple documentation, it's possible state kext dependencies in info.plist file.
any kext can declare dependent upon other kext. developer lists these dependencies in osbundlelibraries dictionary in module’s property list file.
however, i'd other way around marking refs other entities kext, , entities aren't drivers - in windows called services, , 1 can easy link between 2 such services disregarding if they're user-space processes or kernel modules.
thnaks
Comments
Post a Comment