在jprobe_example.c
有一个v3。但它在v4中缺失了。我试图编译v3示例有内核v4,它的工作给我jprobe_example.ko
,但当我尝试insmod
它,它失败了
insmod: ERROR: could not insert module jprobe_example.ko: Operation not permitted.
/var/log/syslog
说,register_jprobe failed, returned -38
另外两个例子是insmod
-ed fine。那么,问题是,jprobes是否已从内核v4中删除?为什么我可以编译模块而不是insmod
呢?
Linux内核中不推荐使用jprobes,并且在commit 9be95bd
中删除了示例文件:
commit 9be95bdc53c12ada23e39027237fd05e1393d893
Author: Masami Hiramatsu <[email protected]>
Date: Fri Oct 6 08:15:57 2017 +0900
kprobes: Remove the jprobes sample code
Remove the jprobes sample module because jprobes are deprecated.
[...]
该提交在4.15-rc1中合并。
-38 is -ENOSYS
,无效系统调用号码的错误代码。