kernel: remove unused kernel_compat
Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@ kernelsu-objs += supercalls.o
|
|||||||
kernelsu-objs += feature.o
|
kernelsu-objs += feature.o
|
||||||
kernelsu-objs += ksud.o
|
kernelsu-objs += ksud.o
|
||||||
kernelsu-objs += embed_ksud.o
|
kernelsu-objs += embed_ksud.o
|
||||||
kernelsu-objs += kernel_compat.o
|
kernelsu-objs += seccomp_cache.o
|
||||||
kernelsu-objs += file_wrapper.o
|
kernelsu-objs += file_wrapper.o
|
||||||
kernelsu-objs += throne_comm.o
|
kernelsu-objs += throne_comm.o
|
||||||
kernelsu-objs += sulog.o
|
kernelsu-objs += sulog.o
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#include "klog.h" // IWYU pragma: keep
|
||||||
#include "selinux/selinux.h"
|
#include "selinux/selinux.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "allowlist.h"
|
#include "allowlist.h"
|
||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
#include "apk_sign.h"
|
#include "apk_sign.h"
|
||||||
#include "dynamic_manager.h"
|
#include "dynamic_manager.h"
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#include "klog.h" // IWYU pragma: keep
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "manager_sign.h"
|
#include "manager_sign.h"
|
||||||
|
|
||||||
struct sdesc {
|
struct sdesc {
|
||||||
|
|||||||
@@ -37,14 +37,13 @@
|
|||||||
#include "feature.h"
|
#include "feature.h"
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#include "klog.h" // IWYU pragma: keep
|
||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
#include "ksud.h"
|
|
||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
#include "selinux/selinux.h"
|
#include "selinux/selinux.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "supercalls.h"
|
#include "supercalls.h"
|
||||||
#include "sucompat.h"
|
#include "sucompat.h"
|
||||||
#include "sulog.h"
|
#include "sulog.h"
|
||||||
#include "throne_tracker.h"
|
#include "seccomp_cache.h"
|
||||||
|
|
||||||
#include "throne_comm.h"
|
#include "throne_comm.h"
|
||||||
#include "umount_manager.h"
|
#include "umount_manager.h"
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#include "dynamic_manager.h"
|
#include "dynamic_manager.h"
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#include "klog.h" // IWYU pragma: keep
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
|
|
||||||
#define MAX_MANAGERS 2
|
#define MAX_MANAGERS 2
|
||||||
|
|||||||
@@ -21,9 +21,4 @@ static long ksu_copy_from_user_retry(void *to,
|
|||||||
return copy_from_user(to, from, count);
|
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
|
#endif
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "allowlist.h"
|
#include "allowlist.h"
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "core_hook.h"
|
#include "core_hook.h"
|
||||||
#include "feature.h"
|
#include "feature.h"
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#include "klog.h" // IWYU pragma: keep
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#include "klog.h" // IWYU pragma: keep
|
||||||
#include "ksud.h"
|
#include "ksud.h"
|
||||||
|
|
||||||
#include "kernel_compat.h"
|
#include "kernel_compat.h"
|
||||||
#include "selinux/selinux.h"
|
#include "selinux/selinux.h"
|
||||||
#include "sucompat.h"
|
#include "sucompat.h"
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/binfmts.h>
|
#include <linux/binfmts.h>
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "manual_su.h"
|
#include "manual_su.h"
|
||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
#include "allowlist.h"
|
#include "allowlist.h"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <linux/filter.h>
|
#include <linux/filter.h>
|
||||||
#include <linux/seccomp.h>
|
#include <linux/seccomp.h>
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#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
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 2) // Android backport this feature in 5.10.2
|
||||||
12
kernel/seccomp_cache.h
Normal file
12
kernel/seccomp_cache.h
Normal 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
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
#include "sepolicy.h"
|
#include "sepolicy.h"
|
||||||
#include "../klog.h" // IWYU pragma: keep
|
#include "../klog.h" // IWYU pragma: keep
|
||||||
#include "ss/symtab.h"
|
#include "ss/symtab.h"
|
||||||
#include "../kernel_compat.h" // Add check Huawei Device
|
|
||||||
|
|
||||||
#define KSU_SUPPORT_ADD_TYPE
|
#define KSU_SUPPORT_ADD_TYPE
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
#include "feature.h"
|
#include "feature.h"
|
||||||
#include "klog.h" // IWYU pragma: keep
|
#include "klog.h" // IWYU pragma: keep
|
||||||
#include "ksud.h"
|
#include "ksud.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "sucompat.h"
|
#include "sucompat.h"
|
||||||
#include "core_hook.h"
|
#include "core_hook.h"
|
||||||
#include "sulog.h"
|
#include "sulog.h"
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
#include <linux/crc32.h>
|
#include <linux/crc32.h>
|
||||||
|
|
||||||
#include "klog.h"
|
#include "klog.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "sulog.h"
|
#include "sulog.h"
|
||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include "core_hook.h"
|
#include "core_hook.h"
|
||||||
#include "objsec.h"
|
#include "objsec.h"
|
||||||
#include "file_wrapper.h"
|
#include "file_wrapper.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "throne_comm.h"
|
#include "throne_comm.h"
|
||||||
#include "dynamic_manager.h"
|
#include "dynamic_manager.h"
|
||||||
#include "umount_manager.h"
|
#include "umount_manager.h"
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "klog.h"
|
#include "klog.h"
|
||||||
#include "throne_comm.h"
|
#include "throne_comm.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
|
|
||||||
#define PROC_UID_SCANNER "ksu_uid_scanner"
|
#define PROC_UID_SCANNER "ksu_uid_scanner"
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
#include "ksu.h"
|
#include "ksu.h"
|
||||||
#include "manager.h"
|
#include "manager.h"
|
||||||
#include "throne_tracker.h"
|
#include "throne_tracker.h"
|
||||||
#include "kernel_compat.h"
|
|
||||||
#include "apk_sign.h"
|
#include "apk_sign.h"
|
||||||
#include "dynamic_manager.h"
|
#include "dynamic_manager.h"
|
||||||
#include "throne_comm.h"
|
#include "throne_comm.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user