From patchwork Mon May 27 08:17:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10962241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B13271390 for ; Mon, 27 May 2019 08:19:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A030B28A05 for ; Mon, 27 May 2019 08:19:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9253728AB9; Mon, 27 May 2019 08:19:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F4C1289A6 for ; Mon, 27 May 2019 08:19:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5E758991C; Mon, 27 May 2019 08:19:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 494F689951 for ; Mon, 27 May 2019 08:19:26 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id s17so15993312wru.3 for ; Mon, 27 May 2019 01:19:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DZcPJUtjgv9EKQIqfc2FSo+GKmCjWmQE5625uXYlrlA=; b=n0ilZVNC9nsS35ooVsCyjWX5rM+uNhoBj5gez1zhunAvftSxgNeN44i1+KSXG6+Uc7 NsLyczpfoUvUAsMO1v33O4nLYLA7YEUj6wwojctF8nwUHCUoXCRy7A0GEjc+v56bFsEd mBbI0yEb4X2UdR1M0uJJLTEWYB11+x2gI4OVX9SWPs0BrE0Mud3In3NmlXILYg7805uB 6PEvL4BRetXxdxL30qLiZStU7h1VXZIRQQ5FXXq5g3CSxeQvIZcVTJTo1gUwU3P3JDLt JG6KDF87yLbJzzpQbSwrIW3pE4bPajH74fQSUpyphjg+OgYY+uXzM3KEkNKy2FTlUrf+ N+yA== X-Gm-Message-State: APjAAAWPgppUPjMsdsO7RldKm+roaINLUAXnkt6YMA7gtjiDyjzepXD2 6eLuyHwUbV1c+PkOgWCsm1+C6pY+ X-Google-Smtp-Source: APXvYqzMUlVUW1Fwkfu+vXmFld07AUFTq1e+L/MqAXuH3JsdS1HFlDTJU4RcRBYJ6EAhvXmA9RkgZQ== X-Received: by 2002:adf:c601:: with SMTP id n1mr67879516wrg.49.1558945164454; Mon, 27 May 2019 01:19:24 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id a124sm7511876wmh.3.2019.05.27.01.19.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 May 2019 01:19:23 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 11/13] drm/vgem: drop DRM_AUTH usage from the driver Date: Mon, 27 May 2019 09:17:39 +0100 Message-Id: <20190527081741.14235-11-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190527081741.14235-1-emil.l.velikov@gmail.com> References: <20190527081741.14235-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DZcPJUtjgv9EKQIqfc2FSo+GKmCjWmQE5625uXYlrlA=; b=h4xR1VSZE1+WbCvh2FlqTbo5Ulw13wVRkWOiMgc+L0GFvU5NHF8UQDFYpbKPKEGjVf kOxwB5Rj9k5vg6Lo6V8uWvD0ZTFmYmxFf9CpNlLRndLawPyytMOK8pdL5Kb28vBZbycv koR6wDWBJuf0XnVF09praX9lQ/GdOWxGY7NwkbGAiW57cprdN4Mp+Ewk6r0OBbeKqyV7 EvfQZp/mblPS38RTmRB92JhTgp5DVLjUbVOL5j9JWDPuWaha0vNs2ghvIZEsTDLVCb2g /135Va/9sYrZuPgib9i476nrYZkznv0QdcxTUQG/Bb/YSxHipWEFeUUOZzqbNOoY15PU UTyg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , emil.l.velikov@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov 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: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov --- drivers/gpu/drm/vgem/vgem_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index 11a8f99ba18c..0ba079f1b302 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -246,8 +246,8 @@ static int vgem_gem_dumb_map(struct drm_file *file, struct drm_device *dev, } static struct drm_ioctl_desc vgem_ioctls[] = { - DRM_IOCTL_DEF_DRV(VGEM_FENCE_ATTACH, vgem_fence_attach_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(VGEM_FENCE_SIGNAL, vgem_fence_signal_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(VGEM_FENCE_ATTACH, vgem_fence_attach_ioctl, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(VGEM_FENCE_SIGNAL, vgem_fence_signal_ioctl, DRM_RENDER_ALLOW), }; static int vgem_mmap(struct file *filp, struct vm_area_struct *vma)