From patchwork Mon Jan 14 08:43:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10761745 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 049276C5 for ; Mon, 14 Jan 2019 08:46:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E963928B8D for ; Mon, 14 Jan 2019 08:46:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD84028BA0; Mon, 14 Jan 2019 08:46: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 81E8228B8D for ; Mon, 14 Jan 2019 08:46:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FCF86E5EF; Mon, 14 Jan 2019 08:46:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 353536E5EF for ; Mon, 14 Jan 2019 08:46:35 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id 96so21825581wrb.2 for ; Mon, 14 Jan 2019 00:46:35 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=9ae8O0C5HdrlyDEAeIRuSPEFuIMHOQcdhGl0yPUH3Pk=; b=DEaluhjyjvuUEQpybjLzj2xNr30umokViO0qdXdyDl0cKen6TFJ/J08YZPbUMKDCKp u6Xi0grwV3tS5OR4Khe50cpXOzPqjgE+OQudCDSPrdZrkgsNxEv9xCX855sghJMtwYaw P34P0Pmr04Tjycpq86777S9juuK06pY1GGtR0ORM6qWomg7+WK35O5Zqztga3K8tRkrB V26vWAryPFrOm0SNDzApj29eov3KetIhDa8lqMaOurYUQScbFr2rxoOD++9+CzntNKx8 x7p7hitQwFqfBVe3t8DzSptZU4hTk/tUeePfhXI+p3viHRMwPWy1RKuAyPc6zxOxQSSp lsbQ== X-Gm-Message-State: AJcUukelpz922DhnQW3w1cjnUX5I8KOs+f3szp1VXBcTP4Aza2jlGKtn 0Irvv8pLsKBxVN9RRjDVZgIdadr9 X-Google-Smtp-Source: ALg8bN4KFjrej0UFHlt43xVbX2dhvwS4zFa1FJScMgQwJEUmnVLsv/R8QknBSlpAIq+ICW7sktbvmg== X-Received: by 2002:a5d:6187:: with SMTP id j7mr23257957wru.300.1547455593668; Mon, 14 Jan 2019 00:46:33 -0800 (PST) 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 v12sm46558980wmd.27.2019.01.14.00.46.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 00:46:33 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: drop DRM_AUTH requirement from AUTH_MAGIC ioctl Date: Mon, 14 Jan 2019 08:43:05 +0000 Message-Id: <20190114084305.15141-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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: 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 Currently only an authenticated master can authenticate another client. In practise the client can only be master if CAP_SYS_ADMIN is present, although having the CAP also sets the client as authenticated. Thus DRM_AUTH in AUTH_MAGIC's "DRM_AUTH | DRM_MASTER" is superfluous. Notices while working on IGT tests. Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index b07c3d147c29..dae841b07365 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -582,7 +582,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = { DRM_IOCTL_DEF(DRM_IOCTL_SET_UNIQUE, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_BLOCK, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_UNBLOCK, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), - DRM_IOCTL_DEF(DRM_IOCTL_AUTH_MAGIC, drm_authmagic, DRM_AUTH|DRM_UNLOCKED|DRM_MASTER), + DRM_IOCTL_DEF(DRM_IOCTL_AUTH_MAGIC, drm_authmagic, DRM_UNLOCKED|DRM_MASTER), DRM_IOCTL_DEF(DRM_IOCTL_ADD_MAP, drm_legacy_addmap_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_RM_MAP, drm_legacy_rmmap_ioctl, DRM_AUTH),