Skip to contentSkip to conversation

tests: add gem_reloc_overflow to check wrapping

PATCH In review Kees Cook 2 participants 2 messages Mar 15, 2013 – Mar 17, 2013

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 tests: add gem_reloc_overflow to check wrapping

This adds a test to make sure that the execbuffer validation routine is checking for invalid addresses, single entry overflow, and multi-entry wrapping overflow.

---
 tests/.gitignore           |    1 +
 tests/Makefile.am          |    1 +
 tests/gem_reloc_overflow.c |  154 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 156 insertions(+)
 create mode 100644 tests/gem_reloc_overflow.c
tests/.gitignore +1 -0
index 7e2d901..fd30412 100644
@@ -45,6 +45,7 @@ gem_pipe_control_store_loop
 gem_pread_after_blit
 gem_pwrite
 gem_readwrite
+gem_reloc_overflow
 gem_reloc_vs_gpu
 gem_reg_read
 gem_render_linear_blits
tests/Makefile.am +1 -0
index ef68a02..2fddfe8 100644
@@ -84,6 +84,7 @@ TESTS_progs = \
 	gem_pipe_control_store_loop \
 	gem_unfence_active_buffers \
 	gem_unref_active_buffers \
+	gem_reloc_overflow \
 	gem_reloc_vs_gpu \
 	drm_vma_limiter \
 	drm_vma_limiter_cpu \
tests/gem_reloc_overflow.c new file +154 -0

154 lines not on this page · raw message

Signature · 6 lines
1.7.9.5


-- 
Kees Cook
Chrome OS Security
#1 lore raw
Quoted 5 lines · Kees Cook

This adds a test to make sure that the execbuffer validation routine is checking for invalid addresses, single entry overflow, and multi-entry wrapping overflow.

Thanks for writing this testcase, patch merged to i-g-t. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch