kernel: Apply the susfs patch

Co-authored-by: simonpunk <simonpunk2016@gmail.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
ShirkNeko
2025-11-14 18:36:04 +08:00
parent 4920877dd8
commit 4c04508267
20 changed files with 982 additions and 77 deletions

View File

@@ -7,11 +7,18 @@
#include <generated/compile.h>
#include <linux/version.h> /* LINUX_VERSION_CODE, KERNEL_VERSION macros */
#ifdef CONFIG_KSU_SUSFS
#include <linux/susfs.h>
#endif
#include "allowlist.h"
#include "ksu.h"
#include "feature.h"
#include "klog.h" // IWYU pragma: keep
#include "throne_tracker.h"
#ifndef CONFIG_KSU_SUSFS
#include "syscall_hook_manager.h"
#endif
#include "ksud.h"
#include "supercalls.h"
@@ -57,11 +64,15 @@ int __init kernelsu_init(void)
ksu_feature_init();
ksu_lsm_hook_init();
ksu_supercalls_init();
sukisu_custom_config_init();
#if defined(CONFIG_KPROBES) && !defined(CONFIG_KSU_SUSFS)
ksu_syscall_hook_manager_init();
#endif
ksu_workqueue = alloc_ordered_workqueue("kernelsu_work_queue", 0);
@@ -69,7 +80,13 @@ int __init kernelsu_init(void)
ksu_throne_tracker_init();
#ifdef CONFIG_KSU_SUSFS
susfs_init();
#endif
#if defined(CONFIG_KPROBES) && !defined(CONFIG_KSU_SUSFS)
ksu_ksud_init();
#endif
#ifdef MODULE
#ifndef CONFIG_KSU_DEBUG
@@ -90,9 +107,11 @@ void kernelsu_exit(void)
destroy_workqueue(ksu_workqueue);
#if defined(CONFIG_KPROBES) && !defined(CONFIG_KSU_SUSFS)
ksu_ksud_exit();
ksu_syscall_hook_manager_exit();
#endif
sukisu_custom_config_exit();