From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Guenter Roeck <linux@roeck-us.net>,
Shreyas Joshi <shreyas.joshi@biamp.com>,
shreyasjoshi15@gmail.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Greg Ungerer <gerg@linux-m68k.org>,
Vineet Gupta <vgupta@synopsys.com>,
Thomas Meyer <thomas@m3y3r.de>, David Gow <davidgow@google.com>,
Brendan Higgins <brendanhiggins@google.com>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Revert "init/console: Use ttynull as a fallback when there is no console"
Date: Thu, 7 Jan 2021 19:46:38 +0200 [thread overview]
Message-ID: <20210107174638.GH4077@smile.fi.intel.com> (raw)
In-Reply-To: <20210107164400.17904-2-pmladek@suse.com>
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.
Shouldn't it have Fixes tag along with Reported-by ones and explanation what
was the actual problem reported?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-01-07 17:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 16:43 [PATCH 0/1] console: Blank console - userspace regression Petr Mladek
2021-01-07 16:44 ` [PATCH 1/1] Revert "init/console: Use ttynull as a fallback when there is no console" Petr Mladek
2021-01-07 17:46 ` Andy Shevchenko [this message]
2021-01-07 17:48 ` Linus Torvalds
2021-01-07 19:16 ` Greg Kroah-Hartman
2021-01-07 19:38 ` Linus Torvalds
2021-01-08 17:45 ` Petr Mladek
2021-01-08 18:49 ` Vineet Gupta
2021-01-08 19:03 ` Linus Torvalds
2021-01-08 3:41 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210107174638.GH4077@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brendanhiggins@google.com \
--cc=davidgow@google.com \
--cc=gerg@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=shreyas.joshi@biamp.com \
--cc=shreyasjoshi15@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=thomas@m3y3r.de \
--cc=torvalds@linux-foundation.org \
--cc=vgupta@synopsys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®