On 30/09/2021 23:12, Alyssa Rosenzweig wrote:
+ /* Executable implies readable */
+ if ((args->flags & PANFROST_BO_NOREAD) &&
+ !(args->flags & PANFROST_BO_NOEXEC))
+ return -EINVAL;
>>>
>>> Generally, executable also implies not-writeable. Should we check that
> > > > > + /* Executable implies readable */
> > > > > + if ((args->flags & PANFROST_BO_NOREAD) &&
> > > > > + !(args->flags & PANFROST_BO_NOEXEC))
> > > > > + return -EINVAL;
> > > >
> > > > Generally, executable also implies not-writeable. Should we check that?
Hi Robin,
On Thu, 30 Sep 2021 21:44:24 +0200
Boris Brezillon wrote:
> On Thu, 30 Sep 2021 20:47:23 +0200
> Boris Brezillon wrote:
>
> > So we can create GPU mappings without R/W permissions. Particularly
> > useful to debug corruptions caused by out-of-bound writes.
>
> Oops, I forgot to ad
On Thu, 30 Sep 2021 18:12:11 -0400
Alyssa Rosenzweig wrote:
> > > > + /* Executable implies readable */
> > > > + if ((args->flags & PANFROST_BO_NOREAD) &&
> > > > + !(args->flags & PANFROST_BO_NOEXEC))
> > > > + return -EINVAL;
> > >
> > > Generally, exec
> > > + /* Executable implies readable */
> > > + if ((args->flags & PANFROST_BO_NOREAD) &&
> > > + !(args->flags & PANFROST_BO_NOEXEC))
> > > + return -EINVAL;
> >
> > Generally, executable also implies not-writeable. Should we check that?
>
> We were allowing it until now, so doin
On Thu, 30 Sep 2021 20:47:23 +0200
Boris Brezillon wrote:
> So we can create GPU mappings without R/W permissions. Particularly
> useful to debug corruptions caused by out-of-bound writes.
Oops, I forgot to add the PANFROST_BO_PRIVATE flag suggested by Robin
here [1]. I'll send a v2.
[1]https:/
On Thu, 30 Sep 2021 15:13:29 -0400
Alyssa Rosenzweig wrote:
> > + /* Executable implies readable */
> > + if ((args->flags & PANFROST_BO_NOREAD) &&
> > + !(args->flags & PANFROST_BO_NOEXEC))
> > + return -EINVAL;
>
> Generally, executable also implies not-writeable. Should
> + /* Executable implies readable */
> + if ((args->flags & PANFROST_BO_NOREAD) &&
> + !(args->flags & PANFROST_BO_NOEXEC))
> + return -EINVAL;
Generally, executable also implies not-writeable. Should we check that?
So we can create GPU mappings without R/W permissions. Particularly
useful to debug corruptions caused by out-of-bound writes.
Signed-off-by: Boris Brezillon
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 14 --
drivers/gpu/drm/panfrost/panfrost_gem.c | 2 ++
drivers/gpu/drm/panfrost