Bug 338023

Summary: Add support for all V4L2/media ioctls
Product: [Developer tools] valgrind Reporter: Hans Verkuil <hverkuil>
Component: memcheckAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.9.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch adding support for V4L2/media ioctls

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.