Author Topic: Disable list of kext  (Read 10423 times)

0 Members and 1 Guest are viewing this topic.

lungren

  • Observer
  • Posts: 13
Disable list of kext
« on: September 25, 2010, 11:03:47 PM »
Hi, i have a request, hope in this.

Is it possibile to add to chameleon a list of disable kexts as this from legacy kernel http://nawcom.com/osx86/files/10.6/Kernels/10.4.0/legacy_kernel/legacy_kernel-1504.7.4.diff:

Code: [Select]
// From <osfmk/kern/debug.c>
 extern int debug_mode;
+/* kaitek / qoopz: blacklist of common kexts that are known to be problematic or undesirable
+ * for virtually all non-apple hardware. see notes in StartIOKit(). */
+
+boolean_t blacklistEnabled = TRUE;
+blacklist_mod_t blacklistMods[] = {
+    { "com.apple.driver.AppleIntelMeromProfile", 0 },
+    { "com.apple.driver.AppleIntelNehalemProfile", 0 },
+    { "com.apple.driver.AppleIntelPenrynProfile", 0 },
+    { "com.apple.driver.AppleIntelYonahProfile", 0 },
+    { "com.apple.driver.AppleIntelCPUPowerManagement", 0 }, // must be added to use in 10.6.1+
+    { "com.apple.iokit.CHUDKernLib", 0 },
+    { "com.apple.iokit.CHUDProf", 0 },
+    { "com.apple.iokit.CHUDUtils", 0 },
+    { NULL, 0 }
+};

Disable list = yes
Disable list = no

Or something similar option in com.apple.Boot.plist

I think can be a good option for many that to use a vanilla kernel but for any due need to disable those kexts.

Example, on one of my configuration, being short, i use vanilla kernel but i need absolute the need to disable the ACPI_SMC_PlatformPlugin so to clear the verbose. (My reason, it's too much long to explain, but all works flawlessy)
I try the Kabyl's disabler but it works good for intelcpupm..., but not for smcplatformplugin. I don't know the reasons. So i'm searching a good way to disable that kext, not delete, not other. I want that when i install, update and not, this kext is already disable.

Thanks, i hope for that option in chameleon.

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: Disable list of kext
« Reply #1 on: September 26, 2010, 06:58:11 PM »
(My reason, it's too much long to explain)

My interest is piqued..please take the time to explain.

I'm sure there must be another way to deal with your SMC issue.
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Disable list of kext
« Reply #2 on: September 27, 2010, 01:51:44 AM »
Hi guys,

Lungren.. yep, please explain. Disabler.kext used to feature ACPI_SMC_PlatformPlugin amongst others and it's still used these days for e.g. AppleUpstreamUserClient so, what's failing on your case? Did you edited your self the kext's info.plist or did you used an old one with ACPI_SMC_PlatformPlugin already on the plist?

Anyway, this request gets a vote from me :)
If the reason needs explaining, i'll be glad to provide it.
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

lungren

  • Observer
  • Posts: 13
Re: Disable list of kext
« Reply #3 on: September 27, 2010, 01:41:50 PM »
Quote
My interest is piqued..please take the time to explain.

I'm sure there must be another way to deal with your SMC issue.

The only way is delete this plugin.  No, there is not. If you use a disabler for CPUPM that message is a message of warning and it's normal.
I want disable the ACPI_SMC_PlatformPlugin. No other.


Quote
Hi guys,

Lungren.. yep, please explain. Disabler.kext used to feature ACPI_SMC_PlatformPlugin amongst others and it's still used these days for e.g. AppleUpstreamUserClient so, what's failing on your case? Did you edited your self the kext's info.plist or did you used an old one with ACPI_SMC_PlatformPlugin already on the plist?

Anyway, this request gets a vote from me 
If the reason needs explaining, i'll be glad to provide it.

The disabler that i'm using now already have all necessary but it doesn't work for this plugin. Maybe with Leopard does, but with Snow the kext is loaded always. The same disabler works good for CPUPM and other.

My request is simple. As in that patched kernel, the same blacklist with also this plugin, but in chemelon.

More and less:

DisableKext:    ACPI_SMC_PlatformPlugin

Or

DisableList: Yes/No

This.



Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Disable list of kext
« Reply #4 on: September 28, 2010, 11:51:08 PM »
The disabler that i'm using now already have all necessary but it doesn't work for this plugin. Maybe with Leopard does, but with Snow the kext is loaded always. The same disabler works good for CPUPM and other.

My request is simple. As in that patched kernel, the same blacklist with also this plugin, but in chemelon.

More and less:

DisableKext:    ACPI_SMC_PlatformPlugin

Or

DisableList: Yes/No

This.
Lungren,

sorry for the delay...
That disabler you posted is the old one; try Chameleon "binaries" package;
there's a 10.6 one there. Check my signature...
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

lungren

  • Observer
  • Posts: 13
Re: Disable list of kext
« Reply #5 on: September 29, 2010, 12:13:07 PM »
Hi Azimutz, i already try this kext and it doesn't work. It is the same posted by me. I think that for this plugin on Snow is need something of more strong. This disabler blocks well that plugin on Leo, but not on Snow.

Need better solution.

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Disable list of kext
« Reply #6 on: September 29, 2010, 08:11:44 PM »
Well, if you say it doesn't work, i have to believe; i didn't tested it. One thing i'm sure, the kexts on the Chameleon binaries package are not the same as the one you posted, even the 10.5 one; checksum doesn't match. If there was any change on the kexts code, i can't tell; maybe you need to play with the IOProbeScore??

Anyway, the request is not that easy to implement, at least for me; the kernel already has all the necessary code, only needs some "tweaking", it's not the case with the booter. We'll see... Meklort is doing some work that might get us closer to that target. I sure would put it to good use :)
« Last Edit: September 29, 2010, 08:47:58 PM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

meklort

  • VoodooLabs
  • Posts: 65
Re: Disable list of kext
« Reply #7 on: September 29, 2010, 10:13:29 PM »
It's possible to implement a blacklist in chameleon. This would entail reading the mkext, looking for the blackilsted kext, and invalidating it inside of the mkext container (there are a few methods to do so). You should also have to scan any individual kext that are loaded outside of the mkext.

This would *not* stope the kernel from later deciding that it needs to load the kext. If someone manually used kextload, there would be no blacklist as it would be implemented in chameleon and not xnu. kextd *does* scan the /S/L/E path whenever it is modified (and may also on bootup, I'm unsure), and as such, the kext could later be loaded automatically.

Basically, you *can* implement a blacklist in chameleon fairly easy, however xnu + kextd might (I'm unsure if it actually will) decide to load the kext anyway after startup. It would also be possible to modify xnu on the fly to add the blacklist, however it would not be trivial to implement and would require some additional infrastructure (such as adding code to inject functions into xnu, which I've been meaning to implement) that is not already in the kernel patching code.
return c ? c : !c;

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Disable list of kext
« Reply #8 on: October 06, 2010, 01:05:00 PM »
Hi Mek, thanks for the input and as always, sorry for the delay :P

Quote
This would *not* stop the kernel from later deciding that it needs to   load the kext. If someone manually used kextload, there would be no   blacklist as it would be implemented in chameleon and not xnu.
Good point!
I have 2 experiences with kext blacklist, the kernel one and old version of XPC booter (Duet based) which implemented one. As far as i can remember, the booter blacklist worked fine at least for AICPM.kext, though i can't really tell if the kext could be loaded later or not (i think i can still test this).
I also don't know the mechanism involved; what ever it was, was fast! I remember that at the time, the booter used Apple's boot.efi for the boot process. No sources available so...

Quote
It would also be possible to modify xnu on the fly to add the blacklist,   however it would not be trivial to implement and would require some   additional infrastructure (such as adding code to inject functions into   xnu, which I've been meaning to implement) that is not already in the   kernel patching code.
I was thinking of this when i mentioned you were doing some work that would get us closer to a solution.

But, this blacklist is not a priority to me; there's other stuff on your work that i would like to have a shot at first and i'm sure you also have other priorities. Maybe we can take a look at this in the future... meanwhile, i will try to gather more info/knowledge on this stuff... need to read a "bit" of IOKit...
« Last Edit: October 06, 2010, 01:07:29 PM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT