kernel: use sys_enter tracepoint for sucompat (#533)
* use sys_enter tracepoint for sucompat * update sucompat rules * clean tif mark * mark tif after load allow list * clear all tif first, then mark target * Fix shell su * allow when escape * fix bugs * kernel: Resolve logical inconsistencies --------- Co-authored-by: Ylarod <me@ylarod.cn> Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
15
kernel/ksu.c
15
kernel/ksu.c
@@ -61,10 +61,6 @@ extern void ksu_sucompat_exit(void);
|
||||
extern void ksu_ksud_init(void);
|
||||
extern void ksu_ksud_exit(void);
|
||||
extern void ksu_supercalls_init();
|
||||
#ifdef CONFIG_KSU_TRACEPOINT_HOOK
|
||||
extern void ksu_trace_register();
|
||||
extern void ksu_trace_unregister();
|
||||
#endif
|
||||
|
||||
int __init kernelsu_init(void)
|
||||
{
|
||||
@@ -106,16 +102,12 @@ int __init kernelsu_init(void)
|
||||
|
||||
ksu_sucompat_init();
|
||||
|
||||
#ifdef CONFIG_KSU_KPROBES_HOOK
|
||||
#ifdef KSU_KPROBES_HOOK
|
||||
ksu_ksud_init();
|
||||
#else
|
||||
pr_debug("init ksu driver\n");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KSU_TRACEPOINT_HOOK
|
||||
ksu_trace_register();
|
||||
#endif
|
||||
|
||||
#ifdef MODULE
|
||||
#ifndef CONFIG_KSU_DEBUG
|
||||
kobject_del(&THIS_MODULE->mkobj.kobj);
|
||||
@@ -139,13 +131,10 @@ void kernelsu_exit(void)
|
||||
|
||||
destroy_workqueue(ksu_workqueue);
|
||||
|
||||
#ifdef CONFIG_KSU_KPROBES_HOOK
|
||||
#ifdef KSU_KPROBES_HOOK
|
||||
ksu_ksud_exit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KSU_TRACEPOINT_HOOK
|
||||
ksu_trace_unregister();
|
||||
#endif
|
||||
|
||||
ksu_sucompat_exit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user