kernel: Rewrite the kernel source code (#554)
* clean unused header * on_module_mounted in ksud.c * refact: use app_profile * unified hook manager * add zygote to hook target * move reboot hook to supercall.c * refactor: kernel_umount setuid_hook * update mark rules, add init mark tracker * remove reboot from check_syscall_fastpath * update setuid_hook, remove uneeded sucompat enable * log freely * kernel: Migrate kprobe hook configuration items * kernel: fix build * cli: add ksud debug mark * Fix rustfmt warning --------- Co-authored-by: Ylarod <me@ylarod.cn> Co-authored-by: Wang Han <416810799@qq.com> Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
23
kernel/kprobe_hook_manager.h
Normal file
23
kernel/kprobe_hook_manager.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef __KSU_H_KSU_KBROBES_HOOK_MANAGER
|
||||
#define __KSU_H_KSU_KBROBES_HOOK_MANAGER
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/binfmts.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/fs.h>
|
||||
#include "selinux/selinux.h"
|
||||
#include "objsec.h"
|
||||
|
||||
#ifndef DEVPTS_SUPER_MAGIC
|
||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
||||
#endif
|
||||
|
||||
extern bool ksu_is_compat __read_mostly;
|
||||
|
||||
extern int __ksu_handle_devpts(struct inode *inode); // sucompat.c
|
||||
|
||||
void ksu_kprobe_hook_init(void);
|
||||
void ksu_kprobe_hook_exit(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user