You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kernel: ksud: add commonized execve/compat_execve hooks for ksud
This commit squashes the following:
- kernel: ksud: commonize execve_ksud handlers
- kernel: ksud: provide ksu_handle_compat_execve_ksud v2
- kernel: ksud: add ksu_handle_execve_ksud v2
This finalizes syscall-only hooking for KernelSU as we provide
both native and compat.
- sys_execve - ksu_handle_execve_ksud
- compat_sys_execve - ksu_handle_compat_execve_ksud
since these two share common logic, we commonize them to
ksu_common_execve_ksud sinc only the argv field is different.
(.native vs .compat)
usage:
ksu_handle_execve_ksud(filename, argv); // for sys_execve
ksu_handle_compat_execve_ksud(filename, argv); // for compat_sys_execve
This implementations avoids any dependency on struct filename
making it also usable on Ultra-Legacy.
Requires:
- kernel: ksud: dont create structs just to deconstruct them for a string (tiann#2595)
original logic was taken from sys_execve_handler_pre
upstream: tiann@2027ac3
Tested-by: selfmusing <[email protected]>
Tested-by: Adam W. Willis <[email protected]>
Tested-by: alternoegraha <[email protected]>
Tested-by: iDead XD <[email protected]>
Tested-by: rsuntk <[email protected]>
Signed-off-by: backslashxx <[email protected]>
Co-Authored-By: Another Guy <[email protected]>
0 commit comments