On Thu, 2018-05-31 at 12:35 +0100, Chris Wilson wrote:
> If the user has created a read-only object, they should not be allowed
> to circumvent the write protection by using a GGTT mmapping. Deny it.
> 
> Also most machines do not support read-only GGTT PTEs, so again we have
> to reject attempted writes. Fortunately, this is known a priori, so we
> can at least reject in the call to create the mmap with backup in the
> fault handler. This is a little draconian as we could blatantly ignore
> the write protection on the pages, but it is far simply to keep the
> readonly object pure. (It is easier to lift a restriction than to impose
> it later!)
> 
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
> Cc: Jon Bloomfield <jon.bloomfi...@intel.com>
> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
> Cc: Matthew Auld <matthew.william.a...@gmail.com>

As discussed in IRC, this is no change to previous uAPI as read-only
objects have not been available previously.

And even afterwards, only GTT_MMAP on RO userptr will be rejected for
platforms that don't have RO pages, so that's part of the newly
implemented RO userptr.

Reviewed-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to