drm/i915/gem: Support parsing of oversize batches
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Oct 2020 11:59:54 +0000 (12:59 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Oct 2020 18:27:05 +0000 (19:27 +0100)
commit57b2d834bf235daab388c3ba12d035c820ae09c6
treee0ba16b37f6a8718d63114d9af43c85af565d874
parenta04ac827366594c7244f60e9be79fcb404af69f0
drm/i915/gem: Support parsing of oversize batches

Matthew Auld noted that on more recent systems (such as the parser for
gen9) we may have objects that are larger than expected by the GEM uAPI
(i.e. greater than u32). These objects would have incorrect implicit
batch lengths, causing the parser to reject them for being incomplete,
or worse.

Based on a patch by Matthew Auld.

Reported-by: Matthew Auld <matthew.auld@intel.com>
Fixes: 435e8fc059db ("drm/i915: Allow parsing of unsized batches")
Testcase: igt/gem_exec_params/larger-than-life-batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Jon Bloomfield <jon.bloomfield@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Cc: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201015115954.871-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c