drm/exynos: drop DRM_AUTH from DRM_RENDER_ALLOW ioctls
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 27 May 2019 08:17:32 +0000 (09:17 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 26 Jun 2019 14:00:39 +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: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527081741.14235-4-emil.l.velikov@gmail.com
drivers/gpu/drm/exynos/exynos_drm_drv.c

index 4d27039..6d06d84 100644 (file)
@@ -77,29 +77,29 @@ static const struct vm_operations_struct exynos_drm_gem_vm_ops = {
 
 static const struct drm_ioctl_desc exynos_ioctls[] = {
        DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_GEM_MAP, exynos_drm_gem_map_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_GEM_GET, exynos_drm_gem_get_ioctl,
                        DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_VIDI_CONNECTION, vidi_connection_ioctl,
                        DRM_AUTH),
        DRM_IOCTL_DEF_DRV(EXYNOS_G2D_GET_VER, exynos_g2d_get_ver_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_G2D_SET_CMDLIST, exynos_g2d_set_cmdlist_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_G2D_EXEC, exynos_g2d_exec_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_IPP_GET_RESOURCES,
                        exynos_drm_ipp_get_res_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_IPP_GET_CAPS, exynos_drm_ipp_get_caps_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_IPP_GET_LIMITS,
                        exynos_drm_ipp_get_limits_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(EXYNOS_IPP_COMMIT, exynos_drm_ipp_commit_ioctl,
-                       DRM_AUTH | DRM_RENDER_ALLOW),
+                       DRM_RENDER_ALLOW),
 };
 
 static const struct file_operations exynos_drm_driver_fops = {