Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp444472pxb; Thu, 2 Sep 2021 07:37:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxukDuUYUIjGqOPBFPIH4BAb4F7AWrmxfUvoPJMHjs+PAZKkmJ8kIrgGkdkdB/xIO48inBR X-Received: by 2002:a05:6402:8c6:: with SMTP id d6mr4022288edz.30.1630593435181; Thu, 02 Sep 2021 07:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630593435; cv=none; d=google.com; s=arc-20160816; b=X4P7zCrzBuwDE3mDK3g5LFp9NDiO7xaj+BzCnL4RrZ38SpsiYlqwgMUCIr9NO5j5Ti 5PmDLt9BR741I4Qn9t5mDH48fecZQeBU5ZxxJXAuIiqvZ1br9RKKCKEdnPaQgs2j50Jw 6cjOvHRoUNxpjOyFR87HjpxQALVBfQaPGr/mvPtpR+tx0Zw9xIWanKBVQDgB+lCz9ToR v6prcRXIyivWCMltNnPXJQu97qzSydmNO5SX3gR+H8+fx2xaEM40GVsEMnLwabLDTgfg S0M9rtjqGamJcIlMLYztA/k9q1VgpuKr46Zh3TeiRuJ6qmOuYGilIB0J1/B+FH+XOAHs 3YNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=9hkBk7sDsjjBAe7AUgCdS1m+mzXVFS6kHPRELfYsC1c=; b=X+R6u5G+6AtvmOCsu5/TXvHTGTPQXx9cqCe+0OC8H1HtWSb0ZvYliJ+yOGenyCXQAg YCPnbM9CvC+DOv4uktALZ/xejY6tPNL2MT2JZrCleP8iDnJ0dCv3YcSkIETsBSaoRbBy Ve+XdnI+SKZctwrjTcGJZ9VXLtsNcpajqDAl1AM2YdtdBxVND/x+WfftxGElOjVU/FFL 73EtFsUt6LgxV4FNQpct6y2TnYTHmvqrOKjD81F6zpQS6lrZbnSw937HGtWVyG86Nuzl O9ow8hAbLoqn46NzcLydQejZliylIR7HfckqGcAYrfF/9U2hM4Mj42elUkixZZ7/aWhS 8opw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Y8s+NJiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si2067456eju.58.2021.09.02.07.36.01; Thu, 02 Sep 2021 07:37:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Y8s+NJiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345450AbhIBOcH (ORCPT + 99 others); Thu, 2 Sep 2021 10:32:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345461AbhIBOcG (ORCPT ); Thu, 2 Sep 2021 10:32:06 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86BF7C061757 for ; Thu, 2 Sep 2021 07:31:07 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id z4so3265753wrr.6 for ; Thu, 02 Sep 2021 07:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=9hkBk7sDsjjBAe7AUgCdS1m+mzXVFS6kHPRELfYsC1c=; b=Y8s+NJiGqgx8TszOhrhN5R6tvbQ7OHnBDyaDgw6+AHEg2rkX66x3Eo/nHE/GhXLryx FbQUh7PMIldTWufZmHktHyoYa9nBOPtA/s+X3D8V/zBTco6SXapOdpzOu19bHY1XLrza rNkak6BgIt+mGk19F7UnVzexpNRxSt+wWtTLU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=9hkBk7sDsjjBAe7AUgCdS1m+mzXVFS6kHPRELfYsC1c=; b=kfBCn08lbX2DBaTm/QXdULlaczJ6yaZDneNinqttlYMzT6nEYHjUsQK8/dS6u6arjf otrAcekyL9UIos1wIZQyNN/6xmk/FOTZmfH8sNg/de24lX0/V/71MhYXJqNxfPjpfDQ0 Cip4frPbKQQgTHepFbfEIcMs+Gln+V5wYH38btoxI1zV3zyygWeE7pqNgMS91U4Um7+j 37OjQVCj+B9mHLIDTRIxb43Sm85pUJYh4k14n4FefmAXKwySws9PmErbBEm+gQO3I05q LD2kDxSlT71k5wysa7vM/YADwoQMD4huzAjDPWZDCGjKF/B+3p+WoYJpT9VMJn9ySMkE wgGA== X-Gm-Message-State: AOAM532jiq3u/7wnSxetTkfa+1NBSOT28nYjVru4xshhGRt/JGXqfw2Q a7DHaIxIlfnWrYBJ6PqNFMIP+w== X-Received: by 2002:a05:6000:1623:: with SMTP id v3mr4235895wrb.288.1630593065981; Thu, 02 Sep 2021 07:31:05 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id m4sm1874978wml.28.2021.09.02.07.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 07:31:05 -0700 (PDT) Date: Thu, 2 Sep 2021 16:31:03 +0200 From: Daniel Vetter To: Javier Martinez Canillas Cc: Thomas Zimmermann , linux-kernel@vger.kernel.org, "H . Peter Anvin" , Maarten Lankhorst , x86@kernel.org, Greg Kroah-Hartman , linux-fbdev@vger.kernel.org, Thomas Gleixner , Maxime Ripard , Borislav Petkov , Peter Robinson , Hans de Goede , dri-devel@lists.freedesktop.org, Ingo Molnar , David Airlie Subject: Re: [RFC PATCH 0/4] Allow to use DRM fbdev emulation layer with CONFIG_FB disabled Message-ID: Mail-Followup-To: Javier Martinez Canillas , Thomas Zimmermann , linux-kernel@vger.kernel.org, "H . Peter Anvin" , Maarten Lankhorst , x86@kernel.org, Greg Kroah-Hartman , linux-fbdev@vger.kernel.org, Thomas Gleixner , Maxime Ripard , Borislav Petkov , Peter Robinson , Hans de Goede , dri-devel@lists.freedesktop.org, Ingo Molnar , David Airlie References: <20210827100027.1577561-1-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.10.0-8-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 01, 2021 at 11:08:10AM +0200, Javier Martinez Canillas wrote: > On 8/31/21 2:35 PM, Daniel Vetter wrote: > > On Sat, Aug 28, 2021 at 12:02:21AM +0200, Javier Martinez Canillas wrote: > > [snip] > > >> > >> We talked about a drmcon with Peter Robinson as well but then decided that a > >> way to disable CONFIG_FB but still having the DRM fbdev emulation could be a > >> intermediary step, hence these RFC patches. > >> > >> But yes, I agree that a drmcon would be the proper approach for this, to not > >> need any fbdev support at all. We will just keep the explicit disable for the > >> fbdev drivers then in the meantime. > > > > I think the only intermediate step would be to disable the fbdev uapi > > (char node and anything in sysfs), while still registering against the > > fbcon layer so you have a console. > > > > Right, $subject disabled the sysfs interface but left the fbdev chardev. I can > try to do a v2 that also disables that interface but just keep the fbcon part. > > > But looking at the things syzbot finds the really problematic code is all > > in the fbcon and console layer in general, and /dev/fb0 seems pretty > > solid. > > > > Yes, but still would be an improvement in the sense that no legacy fbdev uAPI > will be exposed and so user-space would only depend on the DRM/KMS interface. > > > I think for a substantial improvement here in robustness what you really > > want is > > - kmscon in userspace > > - disable FB layer > > - ideally also disable console/vt layer in the kernel > > Earlier in the thread it was mentioned that an in-kernel drmcon could be used > instead. My worry with kmscon is that moving something as critical as console > output to user-space might make harder to troubleshoot early booting issues. > > And also that will require user-space changes. An in-kernel drmcon could be a > drop-in replacement though. The drmcon wouldn't be a full console, but just an emergency log renderer. See Sam's reply, he found the series again. The real attack surface reduction is in getting rid of the console/vt uapi implementation from the kernel. -Daniel > > - have a minimal emergency/boot-up log thing in drm, patches for that > > floated around a few times > > > > Interesting. Do you have any pointers for this? My search-fu failed me when > trying to find these patches. > > Best regards, > -- > Javier Martinez Canillas > Linux Engineering > Red Hat > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch