kernel: Bump tracepoint_hooks to version v1.1
Remove `devpts_hook` and `execveat_hook` from `tracepoint_hooks`
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user