Bug 413119

Summary: ioctl wrapper for DRM_IOCTL_I915_GEM_MMAP
Product: [Developer tools] valgrind Reporter: Simon Richter <Simon.Richter>
Component: memcheckAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: Simon.Richter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to update ioctl argument definition
Patch to handle ioctl
Patch to handle legacy ioctl

Description Simon Richter 2019-10-18 00:08:45 UTC
SUMMARY

This adds a wrapper for the DRM_IOCTL_I915_GEM_MMAP ioctl, which creates a mapping for a DRM buffer object in the client's address space.

STEPS TO REPRODUCE
1. Run an OpenGL application with direct rendering enabled on an Intel GPU under valgrind

OBSERVED RESULT
Memory accesses to command and texture buffers are flagged as errors

EXPECTED RESULT
Command buffers can be written normally

SOFTWARE/OS VERSIONS
Linux: 4.19.37

ADDITIONAL INFORMATION
There are two versions of this ioctl that are distinguished by different argument sizes.
Comment 1 Simon Richter 2019-10-18 00:09:17 UTC
Created attachment 123298 [details]
Patch to update ioctl argument definition
Comment 2 Simon Richter 2019-10-18 00:09:42 UTC
Created attachment 123299 [details]
Patch to handle ioctl
Comment 3 Simon Richter 2019-10-18 00:10:00 UTC
Created attachment 123300 [details]
Patch to handle legacy ioctl
Comment 4 Julian Seward 2019-12-30 10:25:12 UTC
Committed as 57296eee72a6de284a9dee0864ffced884c3f350 (all 3 patches).
Thanks for the patches.