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()
. 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.
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. You may leverage an LKM as a rootkit to hook a specific ftraceable kernel function.
Check this link out: Linux Rootkits Part 2: Ftrace and Function Hooking .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.