From patchwork Mon May 27 08:17:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10962249 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 D8AD913AD for ; Mon, 27 May 2019 08:19:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAC3D28A49 for ; Mon, 27 May 2019 08:19:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF45528AB9; Mon, 27 May 2019 08:19:44 +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 7033E28AB7 for ; Mon, 27 May 2019 08:19:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 87F2C899B0; 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 02A4689958 for ; Mon, 27 May 2019 08:19:24 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id e2so7204024wrv.6 for ; Mon, 27 May 2019 01:19:23 -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=VQ7eNjW/2eOkTuLgrwZ0jTTijZuZ5pGFb5qu5RgXgtQ=; b=G7IUZgYve5g22Rknbc+6oE6Xmxpmf//ZpM6IGw5M+mmmbwtBl+yuQ2N+uy7EZISZLI +t0luCRZieNRbPa/0WNWtDKQePz4rWOehAx+w1ShKMsi4u57yEJq7ZmYhs19osmSL+2T aYHhv942+x8dJVDpHkuuRl4cY+S5Gk8Efm+pDWwLQE7bX75PfzF+JG6BhRQ7wQNGwgA9 2ZN7oY8K9t+Lh5YRuLy9YgyaX4F2r2ARrs//YjLOjjYALTJq+zMfKRnO339t+XfObTxM U3YiAwY7CxgzFEh43WnRjZBqxA5rLDpQ6rII95TRj2vpIAVNYwklp9RuHwQGuXXwtEYm 7rlg== X-Gm-Message-State: APjAAAUU2CxRkAEmvp1M8SkYxmDHBStMEnk5w6yCxsurEqFNehsnttnL gK6/JUQbjG/o9FWI0Btxrbl9uyhG X-Google-Smtp-Source: APXvYqx8Jlz3e+GrwlaEmXL39uXAWQV83oL1FGbdAbGNYw7J7Iqa+/zm6t8CN9vSGQhpFwGVvSiXxA== X-Received: by 2002:adf:dfd0:: with SMTP id q16mr18498160wrn.235.1558945162311; Mon, 27 May 2019 01:19:22 -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.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 May 2019 01:19:21 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 09/13] drm/omap: drop DRM_AUTH from DRM_RENDER_ALLOW ioctls Date: Mon, 27 May 2019 09:17:37 +0100 Message-Id: <20190527081741.14235-9-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=VQ7eNjW/2eOkTuLgrwZ0jTTijZuZ5pGFb5qu5RgXgtQ=; b=QYwxU7yBZpfo+MdjjN/v6g6EdqzyX9xFdQBfUpSIqEsXKyNKuLGW/4YRk3T0gpxkyY J0V+9O57ahcIfmvAz68K78eVA+5wQHy2NLxbB7K6xBmPQ8pDoNAlozfytMRg7xWIe6Dv W6jTEdNHrvbGvPRItASSBdaSk5WQl2m/aUpCU1wRCRQcpzB6AWvZ/9F1qCB6VWQh6Dgo fTwXPjDM/vUw+whQzMG+MaWtJOUK+hM4MwX+ItLN/2+rCoHqZSqjtHD75KAcgiWK0opE bTMqiYmSOqjpStmtpYkyRtyBetbf1W2gsHfAPgdoloTItIiaKgf3hUUR5zPq0D4jdawi oqBw== 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 , Tomi Valkeinen , 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. Note: the outstanding DRM_AUTH instance is: - (badly coped) legacy DRI1 ioctl, which is a noop Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Signed-off-by: Emil Velikov Acked-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 1b9b6f5e48e1..f97781f9d936 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -491,19 +491,19 @@ static int ioctl_gem_info(struct drm_device *dev, void *data, static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = { DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param, - DRM_AUTH | DRM_RENDER_ALLOW), + DRM_RENDER_ALLOW), DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, ioctl_set_param, DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY), DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new, - DRM_AUTH | DRM_RENDER_ALLOW), + DRM_RENDER_ALLOW), /* Deprecated, to be removed. */ DRM_IOCTL_DEF_DRV(OMAP_GEM_CPU_PREP, drm_noop, - DRM_AUTH | DRM_RENDER_ALLOW), + DRM_RENDER_ALLOW), /* Deprecated, to be removed. */ DRM_IOCTL_DEF_DRV(OMAP_GEM_CPU_FINI, drm_noop, - DRM_AUTH | DRM_RENDER_ALLOW), + DRM_RENDER_ALLOW), DRM_IOCTL_DEF_DRV(OMAP_GEM_INFO, ioctl_gem_info, - DRM_AUTH | DRM_RENDER_ALLOW), + DRM_RENDER_ALLOW), }; /*