Bug 338023 - Add support for all V4L2/media ioctls
Summary: Add support for all V4L2/media ioctls
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.9.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 08:45 UTC by Hans Verkuil
Modified: 2014-09-04 14:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch adding support for V4L2/media ioctls (92.00 KB, patch)
2014-08-04 08:45 UTC, Hans Verkuil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Verkuil 2014-08-04 08:45:08 UTC
Created attachment 88099 [details]
Patch adding support for V4L2/media ioctls

The attached patch adds support for all V4L2 and MEDIA ioctls, up to kernel 3.17 (i.e. it includes support for the new ioctls that will become part of 3.17).

When using valgrind on a V4L2 test application I realized that support was missing, so I added it to valgrind. Since V4L2 consists of a huge number of often fairly complex ioctls this was a pretty big job. But since I am one of the V4L2 subsystem co-maintainers I thought it was worth the effort.

There is one problem with the MEDIA_IOC_ENUM_LINKS ioctl: the driver will fill in two arrays that the struct passed to the driver points to. But in valgrind I do not know the size of those arrays. The only way to get that would be to call MEDIA_IOC_ENUM_ENTITIES inside syswrap-linux.c. For now I ignore this, but suggestions on how to solve this are welcome.
Comment 1 Julian Seward 2014-09-04 11:10:03 UTC
Committed, r14455.  Thanks for the patch.
Comment 2 Hans Verkuil 2014-09-04 13:56:24 UTC
You're welcome. I try to keep it up to date. One quick question: for which valgrind release is this targetted?
Comment 3 Julian Seward 2014-09-04 14:06:22 UTC
3.10.0.