This adds the EKHookMemoryRaw function pointer that jailbreaks are able to set to intercept memory hooks. I have also rewritten the old implementation in C (as it was just Swift code calling C functions anyways) and added some improvements to it, such as checking if remapping is even neccessary to write to it.
In the future it would make sense to centralize this API further to also cover any writes of to-be-made-executable data (right now there are some places in ellekit that allocate memory, write to it and then set it as executable), which would also allow a jailbreak to handle something like page signing, but for now this API is enough for Dopamine to intercept all hooks of DSC pages to fix spinlock panics.
Additionally, this also fixes compilation on Xcode 15.3 which was broken due to Apple adding XPC headers to the iOS sdk, because I sure as hell didn't want to install an older Xcode just to compile ellekit :P.
This adds the
EKHookMemoryRaw
function pointer that jailbreaks are able to set to intercept memory hooks. I have also rewritten the old implementation in C (as it was just Swift code calling C functions anyways) and added some improvements to it, such as checking if remapping is even neccessary to write to it.In the future it would make sense to centralize this API further to also cover any writes of to-be-made-executable data (right now there are some places in ellekit that allocate memory, write to it and then set it as executable), which would also allow a jailbreak to handle something like page signing, but for now this API is enough for Dopamine to intercept all hooks of DSC pages to fix spinlock panics.
Additionally, this also fixes compilation on Xcode 15.3 which was broken due to Apple adding XPC headers to the iOS sdk, because I sure as hell didn't want to install an older Xcode just to compile ellekit :P.