There is a jprobe_example.c
in v3. But it is missing in v4. I tried to compile v3 example having kernel v4 and it works giving me jprobe_example.ko
, but when I try to insmod
it, it fails with
insmod: ERROR: could not insert module jprobe_example.ko: Operation not permitted.
/var/log/syslog
says that register_jprobe failed, returned -38
Another two examples are insmod
-ed fine. So, the question is, were jprobes removed from the kernel v4? Why can I compile the module but not insmod
it?
jprobes are deprecated in the Linux kernel and the sample file was removed in commit 9be95bd
:
commit 9be95bdc53c12ada23e39027237fd05e1393d893
Author: Masami Hiramatsu <mhiramat@kernel.org>
Date: Fri Oct 6 08:15:57 2017 +0900
kprobes: Remove the jprobes sample code
Remove the jprobes sample module because jprobes are deprecated.
[...]
That commit was merged in 4.15-rc1.
-38 is -ENOSYS
, the error code for invalid system call numbers.