Questions about ioctl entries
Zhibin Li
haoyouab at gmail.com
Tue Apr 2 16:16:11 UTC 2019
Hi,
I'm trying to figure out how those ioctl decoders actually work. I
found that ioctl entries in strace are always updated according to
linux kernel's updates and I wonder how we can make the decoders
compatible when we are on an OS with older kernel headers.
I've been recently doing research about DRM ioctl and I saw those
related structures are updated frequently. For example,
'struct drm_mode_get_connector' had been added a u32 padding in linux
v3.12 so in /strace/linux/32/ioctls_inc_aligned32.h the size of it was
updated to 0x50. But when the kernel headers are bit older, the size of
this struct is 0x4c. In this case it seems the decoder will not work as
expected because the output will be something like:
'ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0xa7, 0x4c), NULL) = -1 EBADF
(Bad file descriptor)'
because according to /strace/linux/32/ioctls_inc_aligned32.h it's a
80-byte struct. Is there any commonly acceptable way to avoid/resolve
this? Or any materials I can refer to?
Thanks,
Zhibin Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190403/940df686/attachment.html>
More information about the Strace-devel
mailing list