mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-22 13:58:19 +08:00
Apply editorial changes
This commit is contained in:
parent
31a14a036c
commit
3a09a1e473
|
@ -93,6 +93,7 @@ static struct kprobe syscall_kprobe = {
|
||||||
.symbol_name = "__x64_sys_openat",
|
.symbol_name = "__x64_sys_openat",
|
||||||
.pre_handler = sys_call_kprobe_pre_handler,
|
.pre_handler = sys_call_kprobe_pre_handler,
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static unsigned long **sys_call_table_stolen;
|
static unsigned long **sys_call_table_stolen;
|
||||||
|
@ -240,7 +241,6 @@ static void disable_write_protection(void)
|
||||||
static int __init syscall_steal_start(void)
|
static int __init syscall_steal_start(void)
|
||||||
{
|
{
|
||||||
#if USE_KPROBES_PRE_HANDLER_BEFORE_SYSCALL
|
#if USE_KPROBES_PRE_HANDLER_BEFORE_SYSCALL
|
||||||
|
|
||||||
int err;
|
int err;
|
||||||
/* use symbol name from the module parameter */
|
/* use symbol name from the module parameter */
|
||||||
syscall_kprobe.symbol_name = syscall_sym;
|
syscall_kprobe.symbol_name = syscall_sym;
|
||||||
|
@ -250,7 +250,6 @@ static int __init syscall_steal_start(void)
|
||||||
pr_err("Please check the symbol name from 'syscall_sym' parameter.\n");
|
pr_err("Please check the symbol name from 'syscall_sym' parameter.\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if (!(sys_call_table_stolen = acquire_sys_call_table()))
|
if (!(sys_call_table_stolen = acquire_sys_call_table()))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -264,7 +263,6 @@ static int __init syscall_steal_start(void)
|
||||||
sys_call_table_stolen[__NR_openat] = (unsigned long *)our_sys_openat;
|
sys_call_table_stolen[__NR_openat] = (unsigned long *)our_sys_openat;
|
||||||
|
|
||||||
enable_write_protection();
|
enable_write_protection();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pr_info("Spying on UID:%d\n", uid);
|
pr_info("Spying on UID:%d\n", uid);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user