linux/drivers/gpu/drm/i915/selftests
Chris Wilson dd5e024956 drm/i915/selftests: Prevent selecting 0 for our random width/align
When igt_random_offset() is a given a range of [0, PAGE_SIZE], it is
allowed to return 0. However, attempting to use a size of 0 for the
igt_lmem_write_cpu() byte poking, leads to call igt_random_offset() with
a range of [offset, offset + 0] and ask it to find a length of 4 within
it. This triggers the bug on that the requested length should fit within
the range!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200806145728.16495-1-chris@chris-wilson.co.uk
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2020-09-07 14:28:08 +03:00
..
i915_active.c
i915_buddy.c drm/i915/selftests: Avoid passing a random 0 into ilog2 2020-08-19 15:23:36 +03:00
i915_gem.c
i915_gem_evict.c
i915_gem_gtt.c drm/i915/gt: Switch to object allocations for page directories 2020-09-07 14:24:08 +03:00
i915_live_selftests.h
i915_mock_selftests.h
i915_perf.c drm/i915/gt: Switch to object allocations for page directories 2020-09-07 14:24:08 +03:00
i915_perf_selftests.h
i915_random.c
i915_random.h
i915_request.c drm/i915: Fix wrong return value 2020-08-17 16:16:40 -04:00
i915_selftest.c
i915_sw_fence.c
i915_syncmap.c
i915_vma.c
igt_atomic.c
igt_atomic.h
igt_flush_test.c
igt_flush_test.h
igt_live_test.c
igt_live_test.h
igt_mmap.c
igt_mmap.h
igt_reset.c
igt_reset.h
igt_spinner.c
igt_spinner.h
intel_memory_region.c drm/i915/selftests: Prevent selecting 0 for our random width/align 2020-09-07 14:28:08 +03:00
intel_uncore.c
lib_sw_fence.c
lib_sw_fence.h
librapl.c
librapl.h
mock_drm.h
mock_gem_device.c drm/i915: Copy default modparams to mock i915_device 2020-08-19 15:23:07 +03:00
mock_gem_device.h
mock_gtt.c drm/i915/gt: Switch to object allocations for page directories 2020-09-07 14:24:08 +03:00
mock_gtt.h
mock_region.c
mock_region.h
mock_request.c
mock_request.h
mock_uncore.c
mock_uncore.h
scatterlist.c