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:
ShirkNeko
2025-11-06 12:45:37 +08:00
parent ee9c20f62a
commit 71353a70d4
16 changed files with 262 additions and 302 deletions

View File

@@ -3,6 +3,7 @@
#include <linux/types.h>
#include <linux/version.h>
#include "linux/sched.h"
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || defined(KSU_COMPAT_HAS_SELINUX_STATE)
#define KSU_COMPAT_USE_SELINUX_STATE
@@ -14,9 +15,11 @@ void setenforce(bool);
bool getenforce(void);
bool is_task_ksu_domain(const struct cred* cred);
bool is_ksu_domain(void);
bool is_zygote(void *cred);
bool is_zygote(const struct cred* cred);
void apply_kernelsu_rules(void);