kernel: remove unused kernel_compat

Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
ShirkNeko
2025-11-08 19:39:41 +08:00
parent 623dd15cbf
commit 76046c84cd
17 changed files with 17 additions and 21 deletions

View File

@@ -11,7 +11,7 @@ kernelsu-objs += supercalls.o
kernelsu-objs += feature.o
kernelsu-objs += ksud.o
kernelsu-objs += embed_ksud.o
kernelsu-objs += kernel_compat.o
kernelsu-objs += seccomp_cache.o
kernelsu-objs += file_wrapper.o
kernelsu-objs += throne_comm.o
kernelsu-objs += sulog.o

View File

@@ -15,7 +15,6 @@
#include "ksu.h"
#include "klog.h" // IWYU pragma: keep
#include "selinux/selinux.h"
#include "kernel_compat.h"
#include "allowlist.h"
#include "manager.h"

View File

@@ -17,7 +17,6 @@
#include "apk_sign.h"
#include "dynamic_manager.h"
#include "klog.h" // IWYU pragma: keep
#include "kernel_compat.h"
#include "manager_sign.h"
struct sdesc {

View File

@@ -37,14 +37,13 @@
#include "feature.h"
#include "klog.h" // IWYU pragma: keep
#include "ksu.h"
#include "ksud.h"
#include "manager.h"
#include "selinux/selinux.h"
#include "kernel_compat.h"
#include "supercalls.h"
#include "sucompat.h"
#include "sulog.h"
#include "throne_tracker.h"
#include "seccomp_cache.h"
#include "throne_comm.h"
#include "umount_manager.h"

View File

@@ -17,7 +17,6 @@
#include "dynamic_manager.h"
#include "klog.h" // IWYU pragma: keep
#include "kernel_compat.h"
#include "manager.h"
#define MAX_MANAGERS 2

View File

@@ -21,9 +21,4 @@ static long ksu_copy_from_user_retry(void *to,
return copy_from_user(to, from, count);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 2) // Android backport this feature in 5.10.2
extern void ksu_seccomp_clear_cache(struct seccomp_filter *filter, int nr);
extern void ksu_seccomp_allow_cache(struct seccomp_filter *filter, int nr);
#endif
#endif

View File

@@ -7,7 +7,6 @@
#include "allowlist.h"
#include "arch.h"
#include "kernel_compat.h"
#include "core_hook.h"
#include "feature.h"
#include "klog.h" // IWYU pragma: keep

View File

@@ -21,6 +21,7 @@
#include "arch.h"
#include "klog.h" // IWYU pragma: keep
#include "ksud.h"
#include "kernel_compat.h"
#include "selinux/selinux.h"
#include "sucompat.h"

View File

@@ -7,7 +7,6 @@
#include <linux/file.h>
#include <linux/mm.h>
#include <linux/binfmts.h>
#include "kernel_compat.h"
#include "manual_su.h"
#include "ksu.h"
#include "allowlist.h"

View File

@@ -6,7 +6,7 @@
#include <linux/filter.h>
#include <linux/seccomp.h>
#include "klog.h" // IWYU pragma: keep
#include "kernel_compat.h"
#include "seccomp_cache.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 2) // Android backport this feature in 5.10.2

12
kernel/seccomp_cache.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef __KSU_H_SECCOMP_CACHE
#define __KSU_H_SECCOMP_CACHE
#include <linux/fs.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 2) // Android backport this feature in 5.10.2
extern void ksu_seccomp_clear_cache(struct seccomp_filter *filter, int nr);
extern void ksu_seccomp_allow_cache(struct seccomp_filter *filter, int nr);
#endif
#endif

View File

@@ -6,7 +6,6 @@
#include "sepolicy.h"
#include "../klog.h" // IWYU pragma: keep
#include "ss/symtab.h"
#include "../kernel_compat.h" // Add check Huawei Device
#define KSU_SUPPORT_ADD_TYPE

View File

@@ -24,7 +24,6 @@
#include "feature.h"
#include "klog.h" // IWYU pragma: keep
#include "ksud.h"
#include "kernel_compat.h"
#include "sucompat.h"
#include "core_hook.h"
#include "sulog.h"

View File

@@ -15,7 +15,6 @@
#include <linux/crc32.h>
#include "klog.h"
#include "kernel_compat.h"
#include "sulog.h"
#include "ksu.h"

View File

@@ -20,7 +20,6 @@
#include "core_hook.h"
#include "objsec.h"
#include "file_wrapper.h"
#include "kernel_compat.h"
#include "throne_comm.h"
#include "dynamic_manager.h"
#include "umount_manager.h"

View File

@@ -7,7 +7,6 @@
#include "klog.h"
#include "throne_comm.h"
#include "kernel_compat.h"
#include "ksu.h"
#define PROC_UID_SCANNER "ksu_uid_scanner"

View File

@@ -13,7 +13,6 @@
#include "ksu.h"
#include "manager.h"
#include "throne_tracker.h"
#include "kernel_compat.h"
#include "apk_sign.h"
#include "dynamic_manager.h"
#include "throne_comm.h"