kernel: Rewrite kernle version code management

Co-authored-by: lamadaemon <i@lama.icu>
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
ShirkNeko
2025-06-24 23:16:16 +08:00
parent f57fe79c5d
commit 2c2698f6bc
53 changed files with 234 additions and 122 deletions

View File

@@ -4,7 +4,7 @@
#include <linux/types.h>
#include <linux/workqueue.h>
#define KERNEL_SU_VERSION KSU_VERSION
#define KERNEL_SU_VERSION KSU_API_VERSION
#define KERNEL_SU_OPTION 0xDEADBEEF
#define CMD_GRANT_ROOT 0
@@ -23,6 +23,9 @@
#define CMD_UID_SHOULD_UMOUNT 13
#define CMD_IS_SU_ENABLED 14
#define CMD_ENABLE_SU 15
#define CMD_GET_FULL_VERSION 30
#define CMD_ENABLE_KPM 100
#define EVENT_POST_FS_DATA 1
@@ -35,6 +38,12 @@
#define KSU_MAX_GROUPS 32
#define KSU_SELINUX_DOMAIN 64
#define KSU_MAX_VERSION_NAME 255
#ifndef KSU_VERSION
#define KSU_VERSION "v0-unknown-00000000@unkown"
#endif
struct root_profile {
int32_t uid;
int32_t gid;