Bug 413119 - ioctl wrapper for DRM_IOCTL_I915_GEM_MMAP
Summary: ioctl wrapper for DRM_IOCTL_I915_GEM_MMAP
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-18 00:08 UTC by Simon Richter
Modified: 2019-12-30 10:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to update ioctl argument definition (733 bytes, patch)
2019-10-18 00:09 UTC, Simon Richter
Details
Patch to handle ioctl (2.13 KB, patch)
2019-10-18 00:09 UTC, Simon Richter
Details
Patch to handle legacy ioctl (3.54 KB, patch)
2019-10-18 00:10 UTC, Simon Richter
Details

Note You need to log in before you can comment on or make changes to this bug.
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.