From 558dcd89d9fb30bce6c98bad0e4d535dc9e62820 Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Sat, 5 Oct 2024 12:01:25 +0800 Subject: [PATCH] Apply editorial changes --- examples/syscall-steal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/syscall-steal.c b/examples/syscall-steal.c index e885c84b..e0d5bd38 100644 --- a/examples/syscall-steal.c +++ b/examples/syscall-steal.c @@ -93,6 +93,7 @@ static struct kprobe syscall_kprobe = { .symbol_name = "__x64_sys_openat", .pre_handler = sys_call_kprobe_pre_handler, }; + #else static unsigned long **sys_call_table_stolen; @@ -240,7 +241,6 @@ static void disable_write_protection(void) static int __init syscall_steal_start(void) { #if USE_KPROBES_PRE_HANDLER_BEFORE_SYSCALL - int err; /* use symbol name from the module parameter */ 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"); return err; } - #else if (!(sys_call_table_stolen = acquire_sys_call_table())) return -1; @@ -264,7 +263,6 @@ static int __init syscall_steal_start(void) sys_call_table_stolen[__NR_openat] = (unsigned long *)our_sys_openat; enable_write_protection(); - #endif pr_info("Spying on UID:%d\n", uid);