From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: adamsimonelli@gmail.com
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH v2 2/2] tty: Change order of ttynull to be loaded sooner.
Date: Wed, 19 Feb 2025 15:03:08 +0100 [thread overview]
Message-ID: <2025021957-babble-delivery-3035@gregkh> (raw)
In-Reply-To: <20250217040748.2017975-3-adamsimonelli@gmail.com>
On Sun, Feb 16, 2025 at 11:07:48PM -0500, adamsimonelli@gmail.com wrote:
> From: Adam Simonelli <adamsimonelli@gmail.com>
>
> If CONFIG_NULL_TTY_CONSOLE is enabled, and CONFIG_VT is disabled, ttynull
> will become the default primary console device, based on the load order.
You mean "link order" right?
> Users and distributions that are migrating away from CONFIG_VT will
> benefit from this as /dev/console would not suddenly become /dev/ttyS0
> which could otherwise cause some user space behavior changes, namely the
> TCGETS ioctl failing, which causes libc's isatty() to incorrectly return
> false when /dev/ttyS0 is disabled, and will prevent a device that is
> connected to a user's /dev/ttyS0 to suddenly start getting kernel log
> messages.
I'm sorry, but I can not parse that very long sentance. If CONFIG_VT is
not enabled, this isn't going to change anything with ttynull, it will
just happen to have this console loaded before all others, right?
Which implies that this might break existing systems when this loads
before the expected platform-specific drivers. Was this tested on those
systems?
>
> Signed-off-by: Adam Simonelli <adamsimonelli@gmail.com>
> ---
> drivers/tty/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile
> index 07aca5184a55..03bb47e11e1c 100644
> --- a/drivers/tty/Makefile
> +++ b/drivers/tty/Makefile
> @@ -11,6 +11,8 @@ obj-$(CONFIG_N_HDLC) += n_hdlc.o
> obj-$(CONFIG_N_GSM) += n_gsm.o
>
> obj-y += vt/
> +obj-$(CONFIG_NULL_TTY) += ttynull.o
If you are going to rely on link order here, and HAVE to have this above
all other consoles, please document it as such so that people have a
hint as to why you are doing this in the file so it dosn't change again.
thanks,
greg k-h
next prev parent reply other threads:[~2025-02-19 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 4:07 [PATCH v2 0/2] Optionally allow ttynull to be selected as a default console adamsimonelli
2025-02-17 4:07 ` [PATCH v2 1/2] ttynull: Add an option to allow ttynull to be used as a console device adamsimonelli
2025-02-19 14:00 ` Greg Kroah-Hartman
2025-02-23 5:08 ` Adam Simonelli
2025-02-17 4:07 ` [PATCH v2 2/2] tty: Change order of ttynull to be loaded sooner adamsimonelli
2025-02-19 14:03 ` Greg Kroah-Hartman [this message]
2025-02-23 4:56 ` Adam Simonelli
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=2025021957-babble-delivery-3035@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=adamsimonelli@gmail.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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