Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp540922pxu; Thu, 7 Jan 2021 11:17:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmmp4HOBOM1WMAPSRrETPZJoMardglJImfXDZmCmgvPUlPy+PDVGgnD4TCGXuyNi9cQha2 X-Received: by 2002:a17:906:3881:: with SMTP id q1mr211888ejd.490.1610047057688; Thu, 07 Jan 2021 11:17:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610047057; cv=none; d=google.com; s=arc-20160816; b=f6EWWgLcL5xUW/ajKxoMeZr1+EF1XmhqBtB9vcOhb95jFE110w6ETmGIakTiCmESOR OvSTt+ptQzKEs8mi3vxQhH/HanUn+0JlN1+1jFJA+DMmJD68FchshT57V51zcSLVIPa9 FvaWQPBeqt/0Dk3e9i7WJMZBnpD1xiUYz+TWCjrGiarC94MHhbuE3cEHtGWVQWQECY28 l+AFIsrE7egNzOO9BKLuAHyAKDt6xNKkaXBhC08KCOw7W1XTQbjl0P7mtTs2v6Qe/hRI 0axFjIWhS9Tm3a0VXLwzJv69chB6plBynAR4uIosyMGqs8dDzApmIPQsliwYsCnUJQ23 1yVQ== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=1N1fcA5O/Mo+0Wd40aW7KZLpKOZnH6oE8uYfbDitSJk=; b=EEMkWfUYChkhgejvmvvFVbdGqMVTxkwBeQ+gey2K1ZsHm01unjydRXoXvduCuAPx7d aCj4rixkZ0sdlHcIlRQOTVBi6zO/suQ68py41Egw0tk3zlOTH216mOnYte0CHr1YbkRZ XqWgOaLJ/9eFNinpC9hpoVjM/yRbimt1n/YceQlrYqHFSqtFNUhAqoimebcuWdE+Bxt+ XhuLR0FzTb8bLEjMdcjG0fgaCthu+XoHZ4lpPl4rN8zBNcQlf1F60kYR5rmhyb3C/3wo 8Sb3lwwjpzW7AH6ZBZWOTuPHXDh32MwCJJzk/RKJw0iFBg3L0IE3qmNkdnHkKc0K584t i3hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="08Nytn/L"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs18si2821929ejb.435.2021.01.07.11.17.13; Thu, 07 Jan 2021 11:17:37 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b="08Nytn/L"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbhAGTQB (ORCPT + 99 others); Thu, 7 Jan 2021 14:16:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:42722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbhAGTQA (ORCPT ); Thu, 7 Jan 2021 14:16:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B75072343E; Thu, 7 Jan 2021 19:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610046920; bh=eVbf8+HJ1mj8sG5PUsuFmbQMq89wv8eiPNTQRTzGhQc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=08Nytn/LI4ieeCIDrw+lZcGhcDdz7u3YZBv5pHx0ShKjFDcmENZQiFBg6xfx3p2hy 0TVOdTb0hXWXzS3BpESvTzy6NqgTkUrMgLRiE34jGPfw5H9lXWk2z3cDJypG+yANzo uVYwjCZ17gsXn1dT3H2sruDGAs+gg6+hX+nIFXuQ= Date: Thu, 7 Jan 2021 20:16:39 +0100 From: Greg Kroah-Hartman To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , John Ogness , Linus Torvalds , Guenter Roeck , Shreyas Joshi , shreyasjoshi15@gmail.com, Sergey Senozhatsky , Greg Ungerer , Vineet Gupta , Thomas Meyer , David Gow , Brendan Higgins , Andy Shevchenko , Shuah Khan , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] Revert "init/console: Use ttynull as a fallback when there is no console" Message-ID: References: <20210107164400.17904-1-pmladek@suse.com> <20210107164400.17904-2-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107164400.17904-2-pmladek@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 05:44:00PM +0100, Petr Mladek wrote: > This reverts commit 757055ae8dedf5333af17b3b5b4b70ba9bc9da4e. > > The commit caused that ttynull was used as the default console > on many systems. It happened when there was no console configured > on the command line and ttynull_init() was the first initcall > calling register_console(). > > The commit fixed a historical problem that have been there for ages. > The primary motivation was the commit 3cffa06aeef7ece30f6 > ("printk/console: Allow to disable console output by using console="" > or console=null"). It provided a clean solution > for a workaround that was widely used and worked only by chance. > > This revert causes that the console="" or console=null command line > options will again work only by chance. These options will cause that > a particular console will be preferred and the default (tty) ones > will not get enabled. There will be no console registered at > all. As a result there won't be stdin, stdout, and stderr for > the init process. But it worked exactly this way even before. > > The proper solution has to fulfill many conditions: > > + Register ttynull only when explicitly required or as > the ultimate fallback. > > + ttynull must get associated with /dev/console but it must > not become preferred console when used as a fallback. > Especially, it must still be possible to replace it > by a better console later. > > Such a change requires clean up of the register_console() code. > Otherwise, it would be even harder to follow. Especially, the use > of has_preferred_console and CON_CONSDEV flag is tricky. The clean > up is risky. The ordering of consoles is not well defined. And > any changes tend to break existing user settings. > > Do the revert at the least risky solution for now. > > Signed-off-by: Petr Mladek Acked-by: Greg Kroah-Hartman Linus, can you take this directly, or is this going through some other tree? thanks, greg k-h