From patchwork Thu Aug 4 08:06:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 9262903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD8B560754 for ; Thu, 4 Aug 2016 08:07:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B11FD27F8D for ; Thu, 4 Aug 2016 08:07:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A49CE28338; Thu, 4 Aug 2016 08:07: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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 448AB28327 for ; Thu, 4 Aug 2016 08:07:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6430589C9D; Thu, 4 Aug 2016 08:07:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id E95216E620 for ; Thu, 4 Aug 2016 08:07:23 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id o80so41337425wme.0 for ; Thu, 04 Aug 2016 01:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ml5X9kIEQ6yTAHSb2SBU2J0D5H1Fh5eiwsBT2yz3lWc=; b=OTRqK4vobCuqxlTx5Od+KFgbM5DI/kNHhOeD/IGu2+ELml7xDlFr40RD4hEJtwpOXK tlBowPc6yIuRh0x5BvanaT1fGfXZ+vgTGDs9tecjJ4quWkVRu+x5VXYk9vf7xMpViwEE G5RJfV+IFkL35dRZUUGiSZ2W2zYRHg72mBKhAV+RdM4U7tit1hWWUpy8ajqr8vEdJGNM NNGNyS/otRzyqx1qfDSN3miKoC48wBct2DNm1xF/V7cHTLbUjx3we3dlQreIszAxj0U5 KrBpYrVl2yFNUFOGkEcHxk5w7waGOEvPBzP1LrhyzV2cTaxAuivAANXor41MXdwWThPK lUOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ml5X9kIEQ6yTAHSb2SBU2J0D5H1Fh5eiwsBT2yz3lWc=; b=ej6nbBldCoxEphOgKYKFllpFRoxJkGgvNmULPbU9HuIp/6/fxIUT6q78GTB/gXYXNu mLlPUCHtGrCVfOnj9f6iqvGO6He+SWEJZsmjmq9NRbQpTtz2Uj8nDrscGdVZJBqkreck Fx1WXPCi/p3oBKwCGzaoLtFWBx3JN8kPN9tlfUSzN1aLcPkRRkefKU/DYeZ6F6Wv7UEX dPiU4u9eNC12VnIWSq69NY5dh7obWpZ8YtcPRVCIk53SP5eORCWke4bKg3XqpefncT3x DAfL+9vU42BAffdwPFwtnrsCPhdFXYekQVA1cOKXExK72NqbpT/d2q7zO0r72ZpvZWiv pt9w== X-Gm-Message-State: AEkoouvmZBwGKoi1fjfXFd4XaH1ntxuW2B4LtGanJfn7aJQcN2sA+QnCf5iIr/lUUUJl1w== X-Received: by 10.194.123.228 with SMTP id md4mr61788528wjb.91.1470298041295; Thu, 04 Aug 2016 01:07:21 -0700 (PDT) Received: from localhost.localdomain ([37.120.18.65]) by smtp.gmail.com with ESMTPSA id va3sm11555574wjb.18.2016.08.04.01.07.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 01:07:20 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm: make DRI1 drivers depend on BROKEN Date: Thu, 4 Aug 2016 10:06:57 +0200 Message-Id: <20160804080657.9664-2-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160804080657.9664-1-dh.herrmann@gmail.com> References: <20160804080657.9664-1-dh.herrmann@gmail.com> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The legacy DRI1 drivers expose highly broken interfaces to user-space. No modern system should enable them, or you will effectively allow user-space to circumvent most of your kernel security measures. The DRI1 kernel APIs are simply broken. User-space can always use vesafb/efifb/simplefb and friends to get working graphics. Lets hide the old drivers behind CONFIG_BROKEN. In case they turn out to be still used (really?), we can easily revert this and figure out a way to move them out of sight (e.g., moving all DRI1 drivers to drivers/gpu/dri1/). Signed-off-by: David Herrmann Acked-by: Chris Wilson --- drivers/gpu/drm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index d8f6203..48d9223 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -239,6 +239,7 @@ source "drivers/gpu/drm/mediatek/Kconfig" menuconfig DRM_LEGACY bool "Enable legacy drivers (DANGEROUS)" depends on DRM + depends on BROKEN help Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous APIs to user-space, which can be used to circumvent access