Re: Using NVRAM for boot-time kext settings?
Re: Using NVRAM for boot-time kext settings?
- Subject: Re: Using NVRAM for boot-time kext settings?
- From: Regis Duchesne <email@hidden>
- Date: Thu, 26 Mar 2015 12:28:33 +0000
- Thread-topic: Using NVRAM for boot-time kext settings?
Another way than NVRAM (if you use an IOKit kext) is to use the OSDictionary that is passed to your class' init method, or to read the properties your class' node in the IORegistry. Both of these are populated from the kext's Info.plist. That is effectively your settings file, but you don't have to parse it yourself. However, this technique might become less useful now that kexts need to be signed: you can probably no longer simply modify the kext's Info.plist without breaking the signature.
—
hpreg
> On Mar 25, 2015, at 7:43 PM, Phil Jordan <email@hidden> wrote:
>
> Hi,
>
> The issue of boot-time kext configuration seems to come up a lot on this list. I'm fully aware of the fact that it's something of a faux pas to try and configure a kext by reading a settings file from disk in kernel mode. (and why)
>
> One of my clients has a security-related kext (kauth listener etc.) that we currently configure from a userspace daemon that gets started on boot via launchd. However, despite our best efforts, we can't get that daemon to reliably run before the first user apps are resumed, which has negative UX consequences if the hard-coded defaults in the kext don't happen to match the user's configuration.
>
> So we're now trying to come up with creative ideas for configuring the kext as early as possible during boot without resorting to reading config files in the kext. Is the NVRAM considered a reasonable place to store such settings? It's certainly easy enough to access the contents of NVRAM variables from the kext.
>
> If not, any other reasonable suggestions?
>
> Thanks,
> Phil
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden