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

KernelSU: Use scope-minimized manual hooks #27

Closed

Conversation

ChiseWaguri
Copy link

This refactors original KSU hooks to replace deep kernel function hooks with targeted hooks. This backports KernelSU pr#1657 and having pr#2084 elements (32-bit sucompat). This transition reduces the scope of kernel function interception while still maintaining full functionality.

references: backslashxx/KernelSU#5, tiann/KernelSU#1657, tiann/KernelSU#2084
https://kernelsu.org/guide/how-to-integrate-for-non-gki.html

What do you think about this?

ChiseWaguri and others added 2 commits February 24, 2025 12:18
This refactors original KSU hooks to replace deep kernel function hooks with targeted hooks.
This backports KernelSU pr#1657 and having pr#2084 elements (32-bit sucompat).
This transition reduces the scope of kernel function interception while still maintaining full functionality.

references:  backslashxx/KernelSU#5, tiann/KernelSU#1657, tiann/KernelSU#2084
	https://kernelsu.org/guide/how-to-integrate-for-non-gki.html

Co-Authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
- This was done to stay in line with upstream KSU
- Input hook for safemode now hooks input_event instead of input_handle_event
- Devpts hook now hooks pts_unix98_lookup in drivers/tty instead of patching fs/devpts

Co-Authored-By: backslashxx <118538522+backslashxx@users.noreply.github.com>
@Pzqqt
Copy link
Owner

Pzqqt commented Feb 24, 2025

I plan to abandon manual hooks in the future, because KernelSU officials are planning to completely abandon manual hook support and will only support kprobe in the future.

@Pzqqt Pzqqt closed this Feb 24, 2025
@ChiseWaguri
Copy link
Author

We are trying to keep manual hook alive,

tiann/KernelSU#2475, seems like weishu would keep the KPROBE guard

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.

2 participants