Commit 499dd723 authored by 恒宇 梁's avatar 恒宇 梁
Browse files

modify kernel to print some important ptrs

parent 53163692
......@@ -1166,6 +1166,8 @@ EXPORT_SYMBOL(file_open_root);
// return filename;
//}
int print_flag = 0;
////////////////////////////////////
static long do_sys_openat2(int dfd, const char __user *filename,
struct open_how *how)
......@@ -1184,6 +1186,14 @@ static long do_sys_openat2(int dfd, const char __user *filename,
const char* new_filename=sBPF_hook_openat_prog(filename);
tmp = getname(new_filename);
}
if (print_flag == 0) {
printk("address of print_flag: %llu\n", &print_flag);
printk("address of flag_openat_sBPF: %llu\n", &flag_openat_sBPF);
printk("address of sBPF_hook_openat_prog: %llu\n", &sBPF_hook_openat_prog);
print_flag = 1;
}
////////////////////////////////////
if (IS_ERR(tmp))
return PTR_ERR(tmp);
......
......@@ -91,8 +91,8 @@ extern int sysctl_protected_regular;
static int flag_openat_sBPF=0;
static const char* (*sBPF_hook_openat_prog)(const char * filename)=NULL;
EXPORT_SYMBOL(flag_openat_sBPF);
EXPORT_SYMBOL(sBPF_hook_openat_prog);
//EXPORT_SYMBOL(flag_openat_sBPF);
//EXPORT_SYMBOL(sBPF_hook_openat_prog);
/////////////////////////////////
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment