public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org, Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] i915: Add gem_vm_create
Date: Mon, 1 Apr 2019 09:59:53 +0100	[thread overview]
Message-ID: <39c204af-5126-19c1-7f0e-2f81465024bc@linux.intel.com> (raw)
In-Reply-To: <155410877051.24691.5652903200996409646@skylake-alporthouse-com>


On 01/04/2019 09:52, Chris Wilson wrote:
> 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.

I know, the "check" in parentheses was supposed to mean a ticked 
checkbox kind of check. I wasn't clear at all. :( So I was just saying 
to put in a quick assert neither fd is zero. Or if we cannot ever 
imagine running IGT with closed stdin maybe it doesn't matter.

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-04-01  8:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 10:29 [igt-dev] [PATCH i-g-t] i915: Add gem_vm_create Chris Wilson
2019-03-30 10:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for i915: Add gem_vm_create (rev2) Patchwork
2019-04-01  8:12 ` [igt-dev] [PATCH i-g-t] i915: Add gem_vm_create Tvrtko Ursulin
2019-04-01  8:52   ` Chris Wilson
2019-04-01  8:59     ` Tvrtko Ursulin [this message]
2019-04-01  9:04       ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2019-03-14 14:04 Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39c204af-5126-19c1-7f0e-2f81465024bc@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox