From: Deepak Singh Rawat <drawat@vmware.com>
To: Emil Velikov <emil.l.velikov@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Cc: Linux-graphics-maintainer <Linux-graphics-maintainer@vmware.com>
Subject: Re: [Linux-graphics-maintainer] [PATCH 2/3] drm/vmwgfx: add local DRM_AUTH check for PRIME TO/FROM HANDLE
Date: Wed, 24 Jul 2019 20:24:19 +0000 [thread overview]
Message-ID: <c4632fc380c53d5a4cf8237d2cf3ed6a34896eca.camel@vmware.com> (raw)
In-Reply-To: <20190722174025.9830-2-emil.l.velikov@gmail.com>
On Mon, 2019-07-22 at 18:40 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
>
> Realistically no drivers, but vmwgfx care about the DRM_AUTH flag
> here.
>
> Follow-up work in this driver will properly isolate primary clients
> from
> different master realms, thus we'll no longer need to parse _any_
> ioctl
> flags.
>
> Until that work lands, add a local workaround.
>
> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
> Cc: Thomas Hellstrom <thellstrom@vmware.com>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
> I'd like to merge this through the drm-misc tree. Ack and rb are
> appreciated.
>
> Thanks
> Emil
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> index 275d90fe2a25..32c18bb482a6 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -1131,6 +1131,15 @@ static long vmw_generic_ioctl(struct file
> *filp, unsigned int cmd,
> } else if (!drm_ioctl_flags(nr, &flags))
> return -EINVAL;
>
> + /*
> + * Little workaround until the vmwgfx patches providing
> isolation of
> + * primary clients from different master realms lands.
> + * With that work, we'll no longer need to parse _any_ ioctl
> flags.
> + */
> + if (nr == 0x2d /* DRM_IOCTL_PRIME_HANDLE_TO_FD */ ||
> + nr == 0x2e /* DRM_IOCTL_PRIME_FD_TO_HANDLE */)
> + flags != DRM_AUTH;
Do you mean bitwise OR assignment? In current form this is no-op.
> +
> vmaster = vmw_master_check(dev, file_priv, flags);
> if (IS_ERR(vmaster)) {
> ret = PTR_ERR(vmaster);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-07-24 20:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 17:40 [PATCH 1/3] drm/vmwgfx: check master authentication in surface_ref ioctls Emil Velikov
2019-07-22 17:40 ` [PATCH 2/3] drm/vmwgfx: add local DRM_AUTH check for PRIME TO/FROM HANDLE Emil Velikov
2019-07-24 16:12 ` Emil Velikov
2019-07-24 16:22 ` Deepak Singh Rawat
2019-07-24 20:24 ` Deepak Singh Rawat [this message]
[not found] ` <20190722174025.9830-1-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-07-22 17:40 ` [PATCH 3/3] drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls Emil Velikov
[not found] ` <20190722174025.9830-3-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-07-22 19:13 ` Koenig, Christian
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=c4632fc380c53d5a4cf8237d2cf3ed6a34896eca.camel@vmware.com \
--to=drawat@vmware.com \
--cc=Linux-graphics-maintainer@vmware.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.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