[Intel-gfx] [igt-dev] [PATCH i-g-t] i915: Add gem_vm_create
Chris Wilson
chris at chris-wilson.co.uk
Mon Apr 1 08:52:50 UTC 2019
Quoting Tvrtko Ursulin (2019-04-01 09:12:08)
>
>
> On 30/03/2019 10:29, Chris Wilson wrote:
> > + /* Verify the trick with the assumed target works */
> > + write_to_address(i915, ctx[0], obj[0].offset, i915);
> > + gem_read(i915, obj[0].handle, 0, &result, sizeof(result));
> > + igt_assert_eq(result, i915);
> > +
> > + /* Now check that we can't write to vm[0] from second fd/vm */
> > + write_to_address(other, ctx[1], obj[0].offset, other);
> > + gem_read(i915, obj[0].handle, 0, &result, sizeof(result));
> > + igt_assert_eq(result, i915);
> > +
>
> Relies on objects being zeroes (check) and neither fd being zero. To be
> safe add asserts for the latter?
Just replace i915,other there with 1,2. Objects are verified to be zero
in other tests, and it's a core piece of ABI that we don't allow
information leaks so easily.
-Chris
More information about the Intel-gfx
mailing list