[英]Intercepting V4L2 ioctl system calls
I have a reference program that's working correctly and I'm trying to debug why my program doesn't work correctly.我有一个正常工作的参考程序,我正在尝试调试为什么我的程序不能正常工作。 The program makes a series of calls to v4l2_ioctl()
and I'd like to print out the arguments to each call to v4l2_ioctl()
.该程序对v4l2_ioctl()
进行了一系列调用,我想打印出每次调用v4l2_ioctl()
的参数。 Is there a way to intercept these calls without having to recompile the kernel?有没有办法在不重新编译内核的情况下拦截这些调用?
I've tried using gdb, however because I don't have debug symbols I cannot read the arguments.我试过使用 gdb,但是因为我没有调试符号,所以我无法读取参数。
Is there a way to create a virtual device that forwards to the real device, but logs in the process?有没有办法创建一个转发到真实设备的虚拟设备,但在这个过程中登录?
I'm working on an embedded device, so the kernel is a bit... constrained on features.我正在开发嵌入式设备,因此内核有点……受功能限制。
Suppose a loadable kernel module(LKM) is supported in your kernel build.假设您的内核构建支持可加载内核模块(LKM)。 You may leverage an LKM as a rootkit to hook a specific ftraceable kernel function.您可以利用 LKM 作为 rootkit 来挂钩特定的ftraceable内核函数。
Check this link out: Linux Rootkits Part 2: Ftrace and Function Hooking .查看此链接: Linux Rootkits Part 2: Ftrace and Function Hooking 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.