From patchwork Wed Dec 19 19:22:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10738029 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 323D46C2 for ; Wed, 19 Dec 2018 19:25:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2185D27D29 for ; Wed, 19 Dec 2018 19:25:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1599927E5A; Wed, 19 Dec 2018 19:25:38 +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 C3DFB27D29 for ; Wed, 19 Dec 2018 19:25:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D10096F168; Wed, 19 Dec 2018 19:25:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id B51B36F168 for ; Wed, 19 Dec 2018 19:25:34 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id a62so7199580wmh.4 for ; Wed, 19 Dec 2018 11:25:34 -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=Yda5UHx7kap8csDjXb8LTf+SacL13QjA05ptEyGtw8k=; b=actM0Dq+TxeP41PVgh7oH1pQ72JUYK6Xjae6wnfgX6HOKU0V2abbzxM04/wqAD0q6v eAIzcszJeGwn7iMeV9HkkhSccOdghd7Qrgl4GOogTvr2hnhFWnPATw7yezai+hVXxea7 Y8aNiVaL6hrI9Ncw97dYkJrBjfkbbwtj35LQeI2k90KIKqO1xzgNm3k1QDSSYdHgql+h aJWC1b2W4J+7AoHt6c20C0z2QJPKLVSQeujpaSQFxgZgR3Oyd5S5rAwgQHbJiKK3zwx0 oKWqSA7wwwIUxA2jsKRjgVUkAZHGL3VHQk3IH4p+/qX9/NPfkVO+QLYqEL1EXmuZ6X3e vvSA== X-Gm-Message-State: AA+aEWavv5+70hSbTkE+zNs9214u5pH5SpPa70/w6BqLv+xZFhkDUXNS ZZEEyMsswI0WjLM4ehJti9/KZZaHSo0= X-Google-Smtp-Source: AFSGD/WHTbMO7JO1R86V1kurJ/ZI+NdYSdwvTW3qdiPFLgBpwQGK2c3+fc/3FnOFntPN3hxBGx5tew== X-Received: by 2002:a1c:8f95:: with SMTP id r143mr8018401wmd.65.1545247533064; Wed, 19 Dec 2018 11:25:33 -0800 (PST) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:5f00:102:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id c9sm7385483wmh.27.2018.12.19.11.25.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 11:25:32 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/3] drm: tweak permission handling Date: Wed, 19 Dec 2018 19:22:44 +0000 Message-Id: <20181219192247.29880-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.19.2 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 Hi all, This series relaxes some permission handling we have in core. The first patch, swaps the DRM_ROOT_ONLY to DRM_MASTER on DROP_MASTER ioctls. Thus any application can drop privileges just after SET_MASTER and not worry about elevating them, solely for DROP_MASTER. The last commit, admittedly works around userspace bugs. Although it's far better than the "run as root" approach that people have been using. It has the extra side effect of allowing some userspace (but not all) to use vgem without any modifications ;-) Would be great if this series is checked through the Intel GFX trybot but I'm not sure how to do that. Any comments, review or general ack's are appreciated. Thanks Emil Emil Velikov (3): drm: change DROP_MASTER permissions to allow DRM_MASTER drm: annotate drm_core_check_feature() dev arg. as const drm: allow render capable master with DRM_AUTH ioctls drivers/gpu/drm/drm_ioctl.c | 10 +++++++--- include/drm/drm_drv.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-)