Re: Mesa (master): intel: Disallow relocations to the byte beyond the end of the buffer
On Sat, 2009-10-17 at 00:28 -0700, Chris Wilson wrote: > Module: Mesa > Branch: master > Commit: 60a39b6799c72430851d92f93758e2f25487a0f4 > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=60a39b6799c72430851d92f93758e2f25487a0f4 > > Author: Chris Wilson > Date: Sat Oct 17 08:25:48 2009 +0100 > > intel: Disallow relocations to the byte beyond the end of the buffer What did you find that needed this? -- Eric Anholt e...@anholt.net eric.anh...@intel.com signature.asc Description: This is a digitally signed message part ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Re: Mesa (master): intel: Disallow relocations to the byte beyond the end of the buffer
Excerpts from Eric Anholt's message of Mon Oct 19 16:20:50 +0100 2009: > On Sat, 2009-10-17 at 00:28 -0700, Chris Wilson wrote: > > intel: Disallow relocations to the byte beyond the end of the buffer > > What did you find that needed this? There have been a couple of people who have reported a KERN_ERR with the delta pointing to the tail byte, the latest on Saturday: 08:57 < spstarr> [ 148.557731] [drm:i915_gem_object_pin_and_relocate] ERROR Relocation beyond target object bounds: obj 8800b950fc00 target 2381 delta 131072 size 131072. An hour later, spstarr reported having rebuilt mesa, but never did paste the offending backtrace. So I'm still none the wiser. :( -ickle -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): intel: Disallow relocations to the byte beyond the end of the buffer
Module: Mesa Branch: master Commit: 60a39b6799c72430851d92f93758e2f25487a0f4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=60a39b6799c72430851d92f93758e2f25487a0f4 Author: Chris Wilson Date: Sat Oct 17 08:25:48 2009 +0100 intel: Disallow relocations to the byte beyond the end of the buffer --- src/mesa/drivers/dri/intel/intel_batchbuffer.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h index 9a619fb..d4899aa 100644 --- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h @@ -157,7 +157,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch, #define OUT_BATCH(d) intel_batchbuffer_emit_dword(intel->batch, d) #define OUT_RELOC(buf, read_domains, write_domain, delta) do { \ - assert((unsigned) (delta) <= buf->size);\ + assert((unsigned) (delta) < buf->size); \ intel_batchbuffer_emit_reloc(intel->batch, buf, \ read_domains, write_domain, delta); \ } while (0) ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit