Re: [PATCH v2 2/2] tty: Change order of ttynull to be loaded sooner.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux