Open akrogames opened 4 years ago
@akrogames sorry to bother you, can u please tell me how to use this project ?I'm a beginner .THANKS
@akrogames I have solved your problem
Hello @PeterBishop0 thanks for your answer and so sorry for the delay in my reply. I have found a solution too. Do you have the same ?
The issue was the syscall prototype was wrong on modern kernel. The new prototype is : asmlinkage long openat_hook(const struct pt_regs *regs)
And that's work :)
Yes,same solution,Thanks for replying!
akrogames notifications@github.com 于2020年5月27日周三 上午3:17写道:
Hello @PeterBishop0 https://github.com/PeterBishop0 thanks for your answer and so sorry for the delay in my reply. I have found a solution too. Do you have the same ?
The issue was the syscall prototype was wrong on modern kernel. The new prototype is : asmlinkage long openat_hook(const struct pt_regs *regs)
And that's work :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jha/linux-kernel-hook/issues/2#issuecomment-634224209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3PRQDNKQYBOFBLQV5HOITRTQITXANCNFSM4MSDP4LQ .
Hi @jha Just for fun, I am trying to add hook on __NR_openat. Unfortunately, there are a memory issue. Can you check with me ?
I'm testing on 5.3.0-46-generic kernel
Thanks for your work.
In module.c :
sys_hook_add64(lkh_sys_hook, __NR_openat, (void *)openat_hook);
In hook.h :
In hook.c :
Logs from dmesg :