tests: add gem_reloc_overflow to check wrapping
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.
Signed-off-by Kees Cook <[email protected]>
--- 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
@@ -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
@@ -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
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.
Signed-off-by Kees Cook <[email protected]>
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