Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any other ways to record iotcl calls besides strace?

I'm trying to see if certain ioctl calls get called when I call a function(this is on linux).There no way to cause the kernel to write a log with this sort of data, is there?

like image 689
Roman A. Taycher Avatar asked Nov 17 '25 23:11

Roman A. Taycher


1 Answers

On recent kernel, and if kernel is configured with support for tracing and dynamic tracing, ftrace can probably do what you need.

Another option is to write an ioctl wrapper, load it using LD_PRELOAD, and intercept the interesting ioctl in your wrapper.

like image 124
shodanex Avatar answered Nov 20 '25 14:11

shodanex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!