From: Dave Gordon <david.s.gordon@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org,
Miguel Reche <miguel.reche@intel.com>
Subject: Re: [PATCH 4/4] drm/i915: fix relocation of secure buffers
Date: Fri, 15 Apr 2016 13:24:46 +0100 [thread overview]
Message-ID: <5710DD8E.1010405@intel.com> (raw)
In-Reply-To: <20160415114305.GN19990@nuc-i3427.alporthouse.com>
On 15/04/2016 12:43, Chris Wilson wrote:
> On Fri, Apr 15, 2016 at 12:32:57PM +0100, Dave Gordon wrote:
>> There is a problem with the relocation of batches submitted with the
>> I915_EXEC_SECURE flag: although the batch itself will be mapped into the
>> GGTT, any relocations referring to it will use its address in the PPGTT,
>> which almost certainly won't be the same.
> This is incorrect. We can have and do use secure batches in the GGTT that
> use ppGTT self relocations.
> -Chris
No, what I wrote is correct. A batch containing an MI_START_BATCH_BUFFER
with a relocation description specifying the target as another part of
the same batch will have the address of the batch in the PPGTT filled in
there; Miguel has an example to demonstrate this. (And it's obvious from
the code, relocation is completed before the GGTT mapping is created so
can't put the GGTT address in the relocated entry).
Therefore, the secure batch cannot jump to another part of the buffer
and remain in privileged mode.
OTOH it may ALSO be useful for the privileged batch to jump to
UNPRIVILEGED subroutines, which would require the relocation to provide
the PPGTT address (although I wouldn't expect that to be the default).
Maybe we need to extend the relocation interface so the batch can choose?
.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-15 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 11:32 [PATCH 1/4] drm/i915: compile-time consistency check on __EXEC_OBJECT flags Dave Gordon
2016-04-15 11:32 ` [PATCH 2/4] drm/i915: clarify eb_get_batch() Dave Gordon
2016-04-15 11:32 ` [PATCH 3/4] drm/i915: refactor eb_get_batch() Dave Gordon
2016-04-15 11:32 ` [PATCH 4/4] drm/i915: fix relocation of secure buffers Dave Gordon
2016-04-15 11:43 ` Chris Wilson
2016-04-15 12:24 ` Dave Gordon [this message]
2016-04-15 15:04 ` ✗ Fi.CI.BAT: warning for series starting with [1/4] drm/i915: compile-time consistency check on __EXEC_OBJECT flags Patchwork
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=5710DD8E.1010405@intel.com \
--to=david.s.gordon@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=miguel.reche@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