]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/virtio: drop DRM_AUTH usage from the driver
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 27 May 2019 08:17:40 +0000 (09:17 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 26 Jun 2019 14:00:41 +0000 (15:00 +0100)
The authentication can be circumvented, by design, by using the render
node.

From the driver POV there is no distinction between primary and render
nodes, thus we can drop the token.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527081741.14235-12-emil.l.velikov@gmail.com
drivers/gpu/drm/virtio/virtgpu_ioctl.c

index ac60be9b5c1904a0fe82d3b103803d8e609fcef2..1b50c34a29dc8fadd593d7f93048e585d24b7869 100644 (file)
@@ -553,34 +553,34 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,
 
 struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS] = {
        DRM_IOCTL_DEF_DRV(VIRTGPU_MAP, virtio_gpu_map_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 
        DRM_IOCTL_DEF_DRV(VIRTGPU_EXECBUFFER, virtio_gpu_execbuffer_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 
        DRM_IOCTL_DEF_DRV(VIRTGPU_GETPARAM, virtio_gpu_getparam_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 
        DRM_IOCTL_DEF_DRV(VIRTGPU_RESOURCE_CREATE,
                          virtio_gpu_resource_create_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 
        DRM_IOCTL_DEF_DRV(VIRTGPU_RESOURCE_INFO, virtio_gpu_resource_info_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 
        /* make transfer async to the main ring? - no sure, can we
         * thread these in the underlying GL
         */
        DRM_IOCTL_DEF_DRV(VIRTGPU_TRANSFER_FROM_HOST,
                          virtio_gpu_transfer_from_host_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(VIRTGPU_TRANSFER_TO_HOST,
                          virtio_gpu_transfer_to_host_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 
        DRM_IOCTL_DEF_DRV(VIRTGPU_WAIT, virtio_gpu_wait_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 
        DRM_IOCTL_DEF_DRV(VIRTGPU_GET_CAPS, virtio_gpu_get_caps_ioctl,
-                         DRM_AUTH | DRM_RENDER_ALLOW),
+                         DRM_RENDER_ALLOW),
 };