-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Hook syscalls and stable symbols #1657
Conversation
1. Replace `do_execveat_common` with `sys_execve` and `sys_execveat` 2. Replace `input_handle_event` with `input_event` and `input_inject_event`
There are generally several scenarios where
Therefore, I think we don't need to handle so many execve calls, because:
I think it should work fine to remove those three kprobes. |
1. compat syscalls are not used for there is no 32bit manager 2. Android uses execve only
In old implemention, hooking |
Don't use `__getname` function to avoid memory allocation
fixed |
x86_64 failed |
Fixed in 14def44 |
1. Replace `do_execveat_common` with `sys_execve` and `sys_execveat` 2. Replace `input_handle_event` with `input_event` and `input_inject_event` Tested on android12-5.10-2024-04, android13-5.15-2024-04. android14-6.1-2024-04
1. Replace `do_execveat_common` with `sys_execve` and `sys_execveat` 2. Replace `input_handle_event` with `input_event` and `input_inject_event` Tested on android12-5.10-2024-04, android13-5.15-2024-04. android14-6.1-2024-04
This commit integrates manual hooks for KernelSU, replacing the kprobe-based approach. 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 minimizes the scope of kernel function interception while still maintaining full functionality. references: 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 commit integrates manual hooks for KernelSU, replacing the kprobe-based approach. 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 minimizes the scope of kernel function interception while still maintaining full functionality. references: tiann/KernelSU#1657, tiann/KernelSU#2084, backslashxx/KernelSU#5 https://kernelsu.org/guide/how-to-integrate-for-non-gki.html Co-Authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
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>
References: tiann/KernelSU#1657 and tiann/KernelSU#2084 Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
This commit integrates manual hooks for KernelSU, replacing the kprobe-based approach. 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 minimizes the scope of kernel function interception while still maintaining full functionality. references: tiann/KernelSU#1657, tiann/KernelSU#2084, backslashxx/KernelSU#5 https://kernelsu.org/guide/how-to-integrate-for-non-gki.html Co-Authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
References: tiann/KernelSU#1657 and tiann/KernelSU#2084 Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
References: tiann/KernelSU#1657 and tiann/KernelSU#2084 Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
References: tiann/KernelSU#1657 and tiann/KernelSU#2084 Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
References: tiann/KernelSU#1657 and tiann/KernelSU#2084 Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
References: tiann/KernelSU#1657 and tiann/KernelSU#2084 Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
do_execveat_common
withsys_execve
andsys_execveat
input_handle_event
withinput_event
andinput_inject_event
Tested on android12-5.10-2024-04, android13-5.15-2024-04. android14-6.1-2024-04