panfrost: Fix three buffer overflows
I don't know if the debug option I wrote to catch these deserves to get upstream or not…
Ways to detect other potential buffer overflows:
- Use an
ioctl
to do themprotect
GPU-side as well, to detect the GPU reading more than was allocated - Integrate the pool allocator with Valgrind
- Put magic values before and after allocations, and check that they are not overwritten