DRM IOCTL permission change
Subsystems (2)
cover DRM IOCTL permission change
A minor IOCTL permission change for control clients. If there are no objections I'd like to add this to the next vmwgfx -fixes pull request.
Thanks,
Thomas
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm: Allow also control clients to check the drm version
This should be harmless.
Vmware will, due to old infrastructure reasons, be using a privileged control client to supply GUI layout information rather than obtaining it from the device. That control client will be needing access to DRM version information.
--- drivers/gpu/drm/drm_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_ioctl.c +2 -1
@@ -520,7 +520,8 @@ EXPORT_SYMBOL(drm_ioctl_permit);/** Ioctl table */ static const struct drm_ioctl_desc drm_ioctls[] = { -DRM_IOCTL_DEF (DRM_IOCTL_VERSION , drm_version,DRM_UNLOCKED |DRM_RENDER_ALLOW ), +DRM_IOCTL_DEF (DRM_IOCTL_VERSION , drm_version, +DRM_UNLOCKED |DRM_RENDER_ALLOW |DRM_CONTROL_ALLOW ),DRM_IOCTL_DEF (DRM_IOCTL_GET_UNIQUE , drm_getunique,0 ),DRM_IOCTL_DEF (DRM_IOCTL_GET_MAGIC , drm_getmagic,0 ),DRM_IOCTL_DEF (DRM_IOCTL_IRQ_BUSID , drm_irq_by_busid,DRM_MASTER |DRM_ROOT_ONLY ),
Signature · 6 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm: Allow also control clients to check the drm version
Hi
Quoted 5 lines · Thomas Hellstrom
This should be harmless.
Vmware will, due to old infrastructure reasons, be using a privileged control client to supply GUI layout information rather than obtaining it from the device. That control client will be needing access to DRM version information.
I didn't add it to render-nodes as I wasn't aware of any driver still using the version-information. I'm not a big fan on relying on magic numbers, as it doesn't work well with (stable) backports, but if you need it for backwards-compat on vmwgfx, I'm fine with it. But I certainly don't want to encourage new driver authors to use it.
Quoted 12 lines
Signed-off-by Thomas Hellstrom <[email protected]>Reviewed-by Brian Paul <[email protected]>Reviewed-by Sinclair Yeh <[email protected]>--- drivers/gpu/drm/drm_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_ioctl.c +0
-0
drivers/gpu/drm/drm_ioctl.c EXPORT_SYMBOL(drm_ioctl_permit); · line 524
Quoted 6 lines
drivers/gpu/drm/drm_ioctl.c +2
-1@@ -520,7 +520,8 @@ EXPORT_SYMBOL(drm_ioctl_permit);/** Ioctl table */ static const struct drm_ioctl_desc drm_ioctls[] = { -DRM_IOCTL_DEF (DRM_IOCTL_VERSION , drm_version,DRM_UNLOCKED |DRM_RENDER_ALLOW ), +DRM_IOCTL_DEF (DRM_IOCTL_VERSION , drm_version, +DRM_UNLOCKED |DRM_RENDER_ALLOW |DRM_CONTROL_ALLOW ),
Why the line-break? None of the other ioctl definitions cares for the 80ch limit. I'd prefer keeping this uniform.
Thanks
David
Quoted 10 lines
drivers/gpu/drm/drm_ioctl.c +0
-1DRM_IOCTL_DEF (DRM_IOCTL_GET_UNIQUE , drm_getunique,0 ),DRM_IOCTL_DEF (DRM_IOCTL_GET_MAGIC , drm_getmagic,0 ), DRM_IOCTL_DEF(DRM_IOCTL_IRQ_BUSID, drm_irq_by_busid, DRM_MASTER|DRM_ROOT_ONLY), --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm: Allow also control clients to check the drm version
Hi, David,
Quoted 11 lines · David Herrmann
Hi
Quoted 5 lines · Thomas Hellstrom
This should be harmless.
Vmware will, due to old infrastructure reasons, be using a privileged control client to supply GUI layout information rather than obtaining it from the device. That control client will be needing access to DRM version information.I didn't add it to render-nodes as I wasn't aware of any driver still using the version-information.
In fact you did add it to render nodes (commit 3d3b78c), but this is for control nodes.
Quoted 4 lines
I'm not a big fan on relying on magic
numbers, as it doesn't work well with (stable) backports, but if you need it for backwards-compat on vmwgfx, I'm fine with it. But I certainly don't want to encourage new driver authors to use it.
We view the driver version information as user-space api version information, which I can't see changing
with stable backports (except perhaps in very unlikely situations). Of course, there are other ways to signal feature availability, but we've traditionally been checking version minor.
Quoted 14 lines
Quoted 14 lines
Signed-off-by Thomas Hellstrom <[email protected]>Reviewed-by Brian Paul <[email protected]>Reviewed-by Sinclair Yeh <[email protected]>--- drivers/gpu/drm/drm_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_ioctl.c +0
-0@@ -520,7 +520,8 @@ EXPORT_SYMBOL(drm_ioctl_permit);
Quoted 7 lines
drivers/gpu/drm/drm_ioctl.c EXPORT_SYMBOL(drm_ioctl_permit); · line 524
Quoted 5 lines
drivers/gpu/drm/drm_ioctl.c +2
-1/** Ioctl table */ static const struct drm_ioctl_desc drm_ioctls[] = { -DRM_IOCTL_DEF (DRM_IOCTL_VERSION , drm_version,DRM_UNLOCKED |DRM_RENDER_ALLOW ), +DRM_IOCTL_DEF (DRM_IOCTL_VERSION , drm_version, +DRM_UNLOCKED |DRM_RENDER_ALLOW |DRM_CONTROL_ALLOW ),Why the line-break? None of the other ioctl definitions cares for the 80ch limit. I'd prefer keeping this uniform.
OK, I'll fix that up.
Quoted 5 lines
Acked-by David Herrmann <[email protected]>Thanks
David
Thanks,
Thomas
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/drm_ioctl.c +0
-1DRM_IOCTL_DEF (DRM_IOCTL_GET_UNIQUE , drm_getunique,0 ),DRM_IOCTL_DEF (DRM_IOCTL_GET_MAGIC , drm_getmagic,0 ), DRM_IOCTL_DEF(DRM_IOCTL_IRQ_BUSID, drm_irq_by_busid, DRM_MASTER|DRM_ROOT_ONLY), --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=BQIBaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=vpukPkBtpoNQp2IUKuFviOmPNYWVKmen3Jeeu55zmEA&m=-dqJN9pZD2sav6M76SFMIM359ZWmPz3fLT0oU30MVRw&s=ICMYbx449lJwRcYDljH6Z8Zp9SQO6mX71E9Y9OgL_SA&e=
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm: Allow also control clients to check the drm version
Hi
Quoted 12 lines · Thomas Hellstrom
Hi, David,
Quoted 9 lines · David Herrmann
Hi
Quoted 5 lines · Thomas Hellstrom
This should be harmless.
Vmware will, due to old infrastructure reasons, be using a privileged control client to supply GUI layout information rather than obtaining it from the device. That control client will be needing access to DRM version information.
Quoted 5 lines
Quoted 2 lines
I didn't add it to render-nodes as I wasn't aware of any driver still using the version-information.
In fact you did add it to render nodes (commit 3d3b78c), but this is for control nodes.
Sorry, my bad. For control nodes is also fine.
Thanks
David
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel