From: Boris Brezillon <boris.brezillon@collabora.com> To: Emil Velikov <emil.l.velikov@gmail.com> Cc: Alex Deucher <alexander.deucher@amd.com>, Sean Paul <sean@poorly.run>, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 5/5] drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls Date: Wed, 27 Nov 2019 08:41:04 +0100 [thread overview] Message-ID: <20191127084104.1ceb1f62@collabora.com> (raw) In-Reply-To: <20191101130313.8862-5-emil.l.velikov@gmail.com> Hi Emil, On Fri, 1 Nov 2019 13:03:13 +0000 Emil Velikov <emil.l.velikov@gmail.com> wrote: > From: Emil Velikov <emil.velikov@collabora.com> > > As mentioned by Christian, for drivers which support only primary nodes > this changes the returned error from -EACCES into -EOPNOTSUPP/-ENOSYS. Are you sure this is true for MODESET-only nodes (those that do not have the RENDER cap set) implementing ->{fd_to_handle,handle_to_fd}()? Shouldn't the is_authenticated() check still be done in that case? Regards, Boris > > For others, this check in particular will be a noop. So let's remove it > as suggested by Christian. > > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: amd-gfx@lists.freedesktop.org > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: Sean Paul <sean@poorly.run> > Acked-by: Christian König <christian.koenig@amd.com> > Signed-off-by: Emil Velikov <emil.velikov@collabora.com> > --- > drivers/gpu/drm/drm_ioctl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c > index fcd728d7cf72..5afb39688b55 100644 > --- a/drivers/gpu/drm/drm_ioctl.c > +++ b/drivers/gpu/drm/drm_ioctl.c > @@ -652,8 +652,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = { > > DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, 0), > > - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), > - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), > + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_RENDER_ALLOW), > + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_RENDER_ALLOW), > > DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, 0), > DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, 0), _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com> To: Emil Velikov <emil.l.velikov@gmail.com> Cc: Alex Deucher <alexander.deucher@amd.com>, Sean Paul <sean@poorly.run>, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 5/5] drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls Date: Wed, 27 Nov 2019 08:41:04 +0100 [thread overview] Message-ID: <20191127084104.1ceb1f62@collabora.com> (raw) Message-ID: <20191127074104.ICwFar9mN2yJpyUfZIDvB9tpuvi5KBKkwaf6MozAK28@z> (raw) In-Reply-To: <20191101130313.8862-5-emil.l.velikov@gmail.com> Hi Emil, On Fri, 1 Nov 2019 13:03:13 +0000 Emil Velikov <emil.l.velikov@gmail.com> wrote: > From: Emil Velikov <emil.velikov@collabora.com> > > As mentioned by Christian, for drivers which support only primary nodes > this changes the returned error from -EACCES into -EOPNOTSUPP/-ENOSYS. Are you sure this is true for MODESET-only nodes (those that do not have the RENDER cap set) implementing ->{fd_to_handle,handle_to_fd}()? Shouldn't the is_authenticated() check still be done in that case? Regards, Boris > > For others, this check in particular will be a noop. So let's remove it > as suggested by Christian. > > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: amd-gfx@lists.freedesktop.org > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: Sean Paul <sean@poorly.run> > Acked-by: Christian König <christian.koenig@amd.com> > Signed-off-by: Emil Velikov <emil.velikov@collabora.com> > --- > drivers/gpu/drm/drm_ioctl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c > index fcd728d7cf72..5afb39688b55 100644 > --- a/drivers/gpu/drm/drm_ioctl.c > +++ b/drivers/gpu/drm/drm_ioctl.c > @@ -652,8 +652,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = { > > DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, 0), > > - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), > - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), > + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_RENDER_ALLOW), > + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_RENDER_ALLOW), > > DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, 0), > DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, 0), _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-11-27 7:41 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-01 13:03 [PATCH 1/5] drm/vmwgfx: move the require_exist handling together Emil Velikov 2019-11-01 13:03 ` [PATCH 2/5] drm/vmwgfx: check master authentication in surface_ref ioctls Emil Velikov 2019-11-12 12:53 ` Thomas Hellstrom 2019-11-01 13:03 ` [PATCH 3/5] drm/vmwgfx: drop DRM_AUTH for render ioctls Emil Velikov 2019-11-12 12:54 ` Thomas Hellstrom 2019-11-13 14:48 ` Emil Velikov 2019-11-01 13:03 ` [PATCH 4/5] drm/panfrost: remove DRM_AUTH and respective comment Emil Velikov 2019-11-01 13:34 ` Steven Price 2019-11-08 13:10 ` Emil Velikov 2019-11-08 15:55 ` Steven Price 2019-11-08 16:42 ` Emil Velikov 2019-11-01 13:03 ` [PATCH 5/5] drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls Emil Velikov 2019-11-01 13:03 ` Emil Velikov [not found] ` <20191101130313.8862-5-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2019-11-08 13:11 ` Emil Velikov 2019-11-08 13:11 ` Emil Velikov 2019-11-08 13:11 ` Emil Velikov 2019-11-27 7:41 ` Boris Brezillon [this message] 2019-11-27 7:41 ` Boris Brezillon 2019-11-27 16:27 ` Emil Velikov 2019-11-27 16:27 ` Emil Velikov [not found] ` <CACvgo52UB-sAv55_kREgHbRsg6b5KXv7At0TbgUPdc0e1E+QaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-11-27 18:04 ` Daniel Vetter 2019-11-27 18:04 ` Daniel Vetter 2019-11-27 18:04 ` Daniel Vetter [not found] ` <20191127180456.GD406127-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org> 2019-11-27 18:32 ` Emil Velikov 2019-11-27 18:32 ` Emil Velikov 2019-11-27 18:32 ` Emil Velikov [not found] ` <CACvgo50j0sU18-AqeerkgDq9joJysT_0PuQrgVS1tVhUqV9rcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-11-27 18:37 ` Daniel Vetter 2019-11-27 18:37 ` Daniel Vetter 2019-11-27 18:37 ` Daniel Vetter [not found] ` <20191127183700.GN406127-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org> 2019-12-02 17:20 ` Emil Velikov 2019-12-02 17:20 ` Emil Velikov 2019-12-02 17:20 ` Emil Velikov 2019-11-27 16:25 ` [PATCH v2] " Emil Velikov 2019-11-27 16:25 ` Emil Velikov 2019-11-08 13:13 ` [PATCH 1/5] drm/vmwgfx: move the require_exist handling together Emil Velikov 2019-11-08 15:22 ` Thomas Hellstrom 2019-11-12 12:50 ` Thomas Hellstrom
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=20191127084104.1ceb1f62@collabora.com \ --to=boris.brezillon@collabora.com \ --cc=alexander.deucher@amd.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=emil.l.velikov@gmail.com \ --cc=sean@poorly.run \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.