Jump to content

ErmaC
 Share

6 posts in this topic

Recommended Posts

Hello Everyone,
 
For those of you interested in taking a look at the KernelPatcher module, source code for an upcoming version of the module has been opened into public xZenue svn repository here: http://public.xzenue.com/websvn/listing.php?repname=KernelPatcher
 
If you have any bugs or patches that you'd like to make, we can handle it here and then send to https://public.xzenue.com/bugzilla/
 
Do note that the source code has the same license as the previous KernelPatcher module releases: KernelPatcher is licensed under the Attribution-NonCommercial 3.0 Unported license. A copy of the license file is included in the svn repository.
 
We'd also like to request that forks are not made of the KernelPatcher module, instead, we'd like to integrate any good and useful changes into the official release.

 


 

Here the source code. I just adapt it to compile fine with latest Chameleon from the voodoo SVN.

KernelPatcher.zip

download it and move the KernelPatcher folder into the trunk/i386/modules/KernelPatcher (remove the existing one)

 

And here the compiled version of that module.

KernelPatcher.dylib.zip

 

 


 

I hope we can improve that module!

 

Cordially

 

ErmaC

  • Like 6
Link to comment
Share on other sites

For those wodnering, there are two methods to extend the kernel patcher without modifying the source code:

 

(1) Create a module that registers for the "Kernel Patched" hook. This will pass the kernel address, as well a symbol information to your module, allowing for your code to lookup function addresses and perform patches

 

-- or --

 

(2) Create a new kext in Xcode, write your function in C, and compile it. If the kext is located in a special location and has a few properties in it, it'll result in the functions you wrote being used instead of ones in kernel. Currently it's only written for 32bit kernels (I need to update it for 64bit), but it does allow for easy and nice patches to be written. If you'd like an example of  a patch or two, let me know. 

 

EDIT: actually, I just added in the LAPIC patch to the examples/ folder in svn. Take a look at it for an example on how to write the patches in C. You may want to compare the source to the original xnu source to see what changed.

  • Like 6
Link to comment
Share on other sites

  • 2 months later...
Hi meklort,
 
now Chameleon is able to boot Yosemite using the kernelcache lzvn compressed (thanks to AnV for deconding it, and MinusZwei to porting it in C)
...but using kernelpatcher module the system reboot after some seconds, the screen become gray, and the only "verbose" I can see are:
lapic panic removed...
lapic interrup removed...

KLDBootstrap:...... call injected into ....

Seem to do some..

 

Can you hypothesize possible remedies to be taken? 
thanks

 

Micky

 

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Hello Everyone,

 

For those of you interested in taking a look at the KernelPatcher module, source code for an upcoming version of the module has been opened into public xZenue svn repository here: http://public.xzenue.com/websvn/listing.php?repname=KernelPatcher

 

If you have any bugs or patches that you'd like to make, we can handle it here and then send to https://public.xzenue.com/bugzilla/

 

Do note that the source code has the same license as the previous KernelPatcher module releases: KernelPatcher is licensed under the Attribution-NonCommercial 3.0 Unported license. A copy of the license file is included in the svn repository.

 

We'd also like to request that forks are not made of the KernelPatcher module, instead, we'd like to integrate any good and useful changes into the official release.

 


 

Here the source code. I just adapt it to compile fine with latest Chameleon from the voodoo SVN.

attachicon.gifKernelPatcher.zip

download it and move the KernelPatcher folder into the trunk/i386/modules/KernelPatcher (remove the existing one)

 

And here the compiled version of that module.

attachicon.gifKernelPatcher.dylib.zip

 

 


 

I hope we can improve that module!

 

Cordially

 

ErmaC

@ErmaC

 

Hello again Mate :)

It seems that compling the source from chameleon does not work anymore.

Link to comment
Share on other sites

 Share

×
×
  • Create New...