Module Name: src Committed By: riastradh Date: Mon Aug 27 14:47:02 UTC 2018
Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_dma.c i915_drv.h i915_gem.c Log Message: Work around ioctl ABI mistake in i915 drm. A flags argument was added to the I915_GEM_MMAP ioctl. The version of xf86-video-intel we imported was compiled to use the new ioctl structure including the flags argument, but without initializing the flags argument, so it would be userland stack garbage causing i915_gem_mmap_ioctl to fail. Newer xf86-video-intel will query the mmap version first before trying to use either the older ioctl structure, with the original shorter argument and thus no stack garbage (which will be padded with to the full length in the kernel by drm_ioctl), or the newer ioctl structure, with the argument initialized. libdrm does not appear to be affected by this -- it zeroes the longer structure before passing it in. Patch from mrg@, diagnosis and explanation by me. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c \ src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h cvs rdiff -u -r1.51 -r1.52 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.