From patchwork Mon May 27 08:17:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10962239 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 939631390 for ; Mon, 27 May 2019 08:19:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84B5A28A05 for ; Mon, 27 May 2019 08:19:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75B132899B; Mon, 27 May 2019 08:19:35 +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 181B82899B for ; Mon, 27 May 2019 08:19:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6189389958; Mon, 27 May 2019 08:19:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id C8DCC89948; Mon, 27 May 2019 08:19:20 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id u78so2331505wmu.5; Mon, 27 May 2019 01:19:20 -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=7/ikaNXVp9+PnAgzUDoGM6SIYABdB5AKJ9WaI3xbsPs=; b=OMThtahmznxUdhVk+WfjINKhEo6oZdbYj/CyN5AA1nY8D+I5Y/UhK/D3CFLkT2dv8b 3dT3ch4/8aRApFUeEiQfM5YdWG3T5ApPEIrQVW3su8P8RsKEMHBAtKHCXrVi0BuUlCJl FKeS92Q2cT+LXkXttJ+NU5K+R9/H5hHKdItLZXg+kFA9F+LJJSqdcBvZ7X48DQmEwJFH vIYoKjg4JVF0kkCEJ2bTiQHRZeJPdfyq4lk5gNjWJGJ9xmPIrBgMczKAm7VYaq6C/uAu 3aboK69uFmEZu1xXdPkuY3s3FqbhAkP6MRfTdlvNNKSDMEIvjjeAAbDv2m22cvI6k8wE yJPA== X-Gm-Message-State: APjAAAXm+Yyix3Y54QwAOkn9Osh9ZZqM0n4jZ8glOTd42tjy4aeXhi7p JruPCZ/pXTXyzhgRUe01TNIjNKmh X-Google-Smtp-Source: APXvYqxxyufUr+1P1rzDjlqqBfe0aHFQnFeAScxLcRVmKXa1ob7YcZ+JyMWG9/yb7YasxbvKFqUQ3A== X-Received: by 2002:a1c:c5cf:: with SMTP id v198mr9030487wmf.84.1558945158972; Mon, 27 May 2019 01:19:18 -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.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 May 2019 01:19:18 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 06/13] drm/lima: drop DRM_AUTH usage from the driver Date: Mon, 27 May 2019 09:17:34 +0100 Message-Id: <20190527081741.14235-6-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=7/ikaNXVp9+PnAgzUDoGM6SIYABdB5AKJ9WaI3xbsPs=; b=bh/V93i84OIw+2V7Fi881TJbgdGVrsAvj+y3rpLV9EhmlQE85gVYeOvGH0DtHb/SPH jzRbGWQI7iu39VAwJEfFIq/1GpjFjPPDC3G41rF94h/2BTFB2BAzH+s7Nq2WmMHUPH4h nca5JJ0MTNKSemqeU10G1N/tbQMpTv14qkLRs+mPBjpin5FsURpRp2vJrVXuq7zH22Dz eYqki4AvHHAlcMgMky0d4onHp1qClWjkdKZVvMyaGprFqxfUcspNYy34vi63Am6thRtH aMCajH2S26/mY63ViIbmZNuqxfzcjsM0ZOCc5ZLvLiP0NhtL/jFeEXjBb8JwteoSI1ho DzGQ== 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, Qiang Yu , lima@lists.freedesktop.org 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: Qiang Yu Cc: lima@lists.freedesktop.org Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Reviewed-by: Qiang Yu --- drivers/gpu/drm/lima/lima_drv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c index b29c26cd13b2..ae89938c63b1 100644 --- a/drivers/gpu/drm/lima/lima_drv.c +++ b/drivers/gpu/drm/lima/lima_drv.c @@ -231,13 +231,13 @@ static void lima_drm_driver_postclose(struct drm_device *dev, struct drm_file *f } static const struct drm_ioctl_desc lima_drm_driver_ioctls[] = { - DRM_IOCTL_DEF_DRV(LIMA_GET_PARAM, lima_ioctl_get_param, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(LIMA_GEM_CREATE, lima_ioctl_gem_create, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(LIMA_GEM_INFO, lima_ioctl_gem_info, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(LIMA_GEM_SUBMIT, lima_ioctl_gem_submit, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(LIMA_GEM_WAIT, lima_ioctl_gem_wait, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(LIMA_CTX_CREATE, lima_ioctl_ctx_create, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(LIMA_CTX_FREE, lima_ioctl_ctx_free, DRM_AUTH|DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(LIMA_GET_PARAM, lima_ioctl_get_param, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(LIMA_GEM_CREATE, lima_ioctl_gem_create, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(LIMA_GEM_INFO, lima_ioctl_gem_info, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(LIMA_GEM_SUBMIT, lima_ioctl_gem_submit, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(LIMA_GEM_WAIT, lima_ioctl_gem_wait, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(LIMA_CTX_CREATE, lima_ioctl_ctx_create, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF_DRV(LIMA_CTX_FREE, lima_ioctl_ctx_free, DRM_RENDER_ALLOW), }; static const struct file_operations lima_drm_driver_fops = {