From: Guenter Roeck <linux@roeck-us.net>
To: Guillermo Rodriguez Garcia <guille.rodriguez@gmail.com>,
linux-kernel@vger.kernel.org
Cc: Petr Mladek <pmladek@suse.com>,
Alejandro Vazquez <avazquez.dev@gmail.com>,
Shreyas Joshi <shreyas.joshi@biamp.com>,
sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
shreyasjoshi15@gmail.com
Subject: Re: Change of behaviour when console=null and ttynull driver is used
Date: Thu, 16 Mar 2023 06:40:37 -0700 [thread overview]
Message-ID: <83c9306a-dbfe-819a-16d8-6242437b2810@roeck-us.net> (raw)
In-Reply-To: <CABDcavZWz=YOvZnW8pkQmuTVjTDxPPoa0zOiC7A_0HAEg_Vi3w@mail.gmail.com>
On 3/16/23 03:29, Guillermo Rodriguez Garcia wrote:
> Hi all,
>
> We have several embedded systems where pass console= or console=null
> in production to disable the console.
>
> Later we check for this in user space: in our inittab we check if fd0
> is "associated with a terminal" (test -t 0); if so, we are in
> development mode and we open a debug shell; otherwise (console
> disabled) we just start the application.
>
> Recently [1] this behaviour has changed and now if we pass console= or
> console=null, the new ttynull driver is used. This breaks the check we
> were doing (test -t 0 always true now).
>
> Is there a way to get the previous behaviour? If not, is there an easy
> way for userspace to detect whether the console device is a "real" tty
> or ttynull (other than trying to parse the kernel boot args, which
> would be a bit fragile).
>
> Thank you,
>
> (If possible, please CC me in any replies)
>
> [1]: https://lore.kernel.org/lkml/X%2FcDG%2FxCCzSWW2cd@alley/t/
>
Let me know if/when you find a solution. In ChromeOS we have to carry
reverts of commit 48021f981308 ("printk: handle blank console arguments
passed in.") and commit 3cffa06aeef7 ("printk/console: Allow to disable
console output by using console="" or console=null") to handle the
same problem (the above mentioned commit didn't work and had odd side
effects).
Guenter
next prev parent reply other threads:[~2023-03-16 13:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 10:29 Guillermo Rodriguez Garcia
2023-03-16 13:40 ` Guenter Roeck [this message]
2023-03-22 8:23 ` Guillermo Rodriguez Garcia
2023-03-22 15:03 ` Guenter Roeck
2023-03-17 12:51 ` Petr Mladek
2023-03-22 8:33 ` Guillermo Rodriguez Garcia
2023-03-22 15:05 ` Guenter Roeck
2023-03-22 15:56 ` Guillermo Rodriguez Garcia
2023-03-24 15:08 ` Petr Mladek
2023-03-24 17:01 ` Guillermo Rodriguez Garcia
2023-03-26 23:20 ` Linus Torvalds
2023-03-27 3:38 ` Guenter Roeck
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=83c9306a-dbfe-819a-16d8-6242437b2810@roeck-us.net \
--to=linux@roeck-us.net \
--cc=avazquez.dev@gmail.com \
--cc=guille.rodriguez@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=shreyas.joshi@biamp.com \
--cc=shreyasjoshi15@gmail.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®