Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EKHookMemoryRaw, fix compilation with Xcode 15.3 #55

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

opa334
Copy link
Contributor

@opa334 opa334 commented Apr 26, 2024

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.

@tealbathingsuit tealbathingsuit merged commit 9cd223a into tealbathingsuit:main Apr 26, 2024
3 checks passed
@silentninjabee
Copy link

Nice job :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants