diff --git a/kernel/ksu_trace.c b/kernel/ksu_trace.c index 76d581ba..d537bca4 100644 --- a/kernel/ksu_trace.c +++ b/kernel/ksu_trace.c @@ -1,9 +1,6 @@ #include "ksu_trace.h" // extern kernelsu functions -extern bool ksu_execveat_hook __read_mostly; -extern int ksu_handle_execveat(int *fd, struct filename **filename_ptr, - void *argv, void *envp, int *flags); extern int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr, void *argv, void *envp, int *flags); extern int ksu_handle_faccessat(int *dfd, const char __user **filename_user, @@ -20,23 +17,11 @@ extern int ksu_handle_devpts(struct inode *); // end kernelsu functions // tracepoint callback functions -void ksu_trace_execveat_hook_callback(void *data, int *fd, - struct filename **filename_ptr, - void *argv, void *envp, int *flags) -{ - if (unlikely(ksu_execveat_hook)) - ksu_handle_execveat(fd, filename_ptr, argv, envp, flags); - else - ksu_handle_execveat_sucompat(fd, filename_ptr, NULL, NULL, - NULL); -} - void ksu_trace_execveat_sucompat_hook_callback(void *data, int *fd, struct filename **filename_ptr, void *argv, void *envp, int *flags) { - if (!ksu_execveat_hook) ksu_handle_execveat_sucompat(fd, filename_ptr, argv, envp, flags); } @@ -68,17 +53,11 @@ void ksu_trace_input_hook_callback(void *data, unsigned int *type, ksu_handle_input_handle_event(type, code, value); } -void ksu_trace_devpts_hook_callback(void *data, struct inode *inode) -{ - ksu_handle_devpts(inode); -} // end tracepoint callback functions // register tracepoint callback functions void ksu_trace_register(void) { - register_trace_ksu_trace_execveat_hook(ksu_trace_execveat_hook_callback, - NULL); register_trace_ksu_trace_execveat_sucompat_hook( ksu_trace_execveat_sucompat_hook_callback, NULL); register_trace_ksu_trace_faccessat_hook( @@ -88,15 +67,11 @@ void ksu_trace_register(void) register_trace_ksu_trace_stat_hook(ksu_trace_stat_hook_callback, NULL); register_trace_ksu_trace_input_hook(ksu_trace_input_hook_callback, NULL); - register_trace_ksu_trace_devpts_hook(ksu_trace_devpts_hook_callback, - NULL); } // unregister tracepoint callback functions void ksu_trace_unregister(void) { - unregister_trace_ksu_trace_execveat_hook( - ksu_trace_execveat_hook_callback, NULL); unregister_trace_ksu_trace_execveat_sucompat_hook( ksu_trace_execveat_sucompat_hook_callback, NULL); unregister_trace_ksu_trace_faccessat_hook( @@ -107,6 +82,4 @@ void ksu_trace_unregister(void) NULL); unregister_trace_ksu_trace_input_hook(ksu_trace_input_hook_callback, NULL); - unregister_trace_ksu_trace_devpts_hook(ksu_trace_devpts_hook_callback, - NULL); } diff --git a/kernel/ksu_trace.h b/kernel/ksu_trace.h index 8f9eb52d..bb80c8d6 100644 --- a/kernel/ksu_trace.h +++ b/kernel/ksu_trace.h @@ -7,11 +7,6 @@ #include #include -DECLARE_TRACE(ksu_trace_execveat_hook, - TP_PROTO(int *fd, struct filename **filename_ptr, void *argv, - void *envp, int *flags), - TP_ARGS(fd, filename_ptr, argv, envp, flags)); - DECLARE_TRACE(ksu_trace_execveat_sucompat_hook, TP_PROTO(int *fd, struct filename **filename_ptr, void *argv, void *envp, int *flags), @@ -35,8 +30,6 @@ DECLARE_TRACE(ksu_trace_input_hook, TP_PROTO(unsigned int *type, unsigned int *code, int *value), TP_ARGS(type, code, value)); -DECLARE_TRACE(ksu_trace_devpts_hook, TP_PROTO(struct inode *inode), - TP_ARGS(inode)); #endif /* _KSU_TRACE_H */ diff --git a/kernel/ksu_trace_export.c b/kernel/ksu_trace_export.c index 0f21cbb0..afa44721 100644 --- a/kernel/ksu_trace_export.c +++ b/kernel/ksu_trace_export.c @@ -1,10 +1,8 @@ #define CREATE_TRACE_POINTS #include "ksu_trace.h" -EXPORT_TRACEPOINT_SYMBOL_GPL(ksu_trace_execveat_hook); EXPORT_TRACEPOINT_SYMBOL_GPL(ksu_trace_execveat_sucompat_hook); EXPORT_TRACEPOINT_SYMBOL_GPL(ksu_trace_faccessat_hook); EXPORT_TRACEPOINT_SYMBOL_GPL(ksu_trace_sys_read_hook); EXPORT_TRACEPOINT_SYMBOL_GPL(ksu_trace_stat_hook); EXPORT_TRACEPOINT_SYMBOL_GPL(ksu_trace_input_hook); -EXPORT_TRACEPOINT_SYMBOL_GPL(ksu_trace_devpts_hook);