lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025021957-babble-delivery-3035@gregkh>
Date: Wed, 19 Feb 2025 15:03:08 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: adamsimonelli@...il.com
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jiri Slaby <jirislaby@...nel.org>
Subject: Re: [PATCH v2 2/2] tty: Change order of ttynull to be loaded sooner.

On Sun, Feb 16, 2025 at 11:07:48PM -0500, adamsimonelli@...il.com wrote:
> From: Adam Simonelli <adamsimonelli@...il.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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ