Linux/linux ea0b163drivers/gpu/drm/i915 i915_cmd_parser.c

drm/i915/cmdparser: Fix jump whitelist clearing

When a jump_whitelist bitmap is reused, it needs to be cleared.
Currently this is done with memset() and the size calculation assumes
bitmaps are made of 32-bit words, not longs.  So on 64-bit
architectures, only the first half of the bitmap is cleared.

If some whitelist bits are carried over between successive batches
submitted on the same context, this will presumably allow embedding
the rogue instructions that we're trying to reject.

Use bitmap_zero() instead, which gets the calculation right.

Fixes: f8c08d8faee5 ("drm/i915/cmdparser: Add support for backward jumps")
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
Signed-off-by: Jon Bloomfield <jon.bloomfield at intel.com>
DeltaFile
+2-3drivers/gpu/drm/i915/i915_cmd_parser.c
+2-31 files

UnifiedSplitRaw