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: <eb1a687d-43ba-3a48-52f7-716963ba6a1c@infradead.org>
Date:   Wed, 7 Mar 2018 17:49:14 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Daniel Kurtz <djkurtz@...omium.org>
Cc:     adurbin@...omium.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" 
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] x86/Kconfig: Add config to allow not defining old
 serial ports

On 03/07/2018 03:24 PM, Daniel Kurtz wrote:
> The old_serial_port global array in 8250_core is supposed to hold an entry
> for each serial port on the system that cannot be discovered via a
> standard enumeration mechanism (aka ACPI/PCI/DTS).  The array is populated
> at compile-time from the value specified in the SERIAL_PORT_DFNS macro.
> This macro is defined in arch/serial.h.
> 
> For x86, this macro is currently unconditionally initialized to supply
> four ioport UARTs (0x3F8, 0x2F8, 0x3E8, 0x2E8).
> 
> However, not all x86 CPUs have these four ioport UARTs.  For example, the
> UARTs on AMD Carrizo and later are separate memory mapped Designware IP
> blocks.
> 
> Fairly early in boot the console_initcall univ8250_console_init iterates
> over this array and installs these old UARTs into the global array
> serial8250_ports.  Further, it attemptes to register them for use as
> the console.  In other words, if, for example, the kernel commandline has
> console=ttyS0, the console will be switched over to one of these
> non-existent UARTs.  Only later, when the real UART drivers are probed
> and their devices are instantiated will the console switch back over to
> the proper UART.
> 
> This is most noticeable when using earlycon, since part of the serial
> console log will appear to disappear (when the bogus old takes over) and
> then re-appear (when the real UART finally gets registered for the
> console).
> 
> Add a Kconfig option to allow overriding this default hard coded value
> for arch/x86 devices that do not have such serial ports.
> 
> Signed-off-by: Daniel Kurtz <djkurtz@...omium.org>
> ---
>  arch/x86/Kconfig              | 11 +++++++++++
>  arch/x86/include/asm/serial.h |  4 ++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 0a258bb30159..7501cd776cfc 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -463,6 +463,17 @@ config X86_SERIAL_BASE_BAUD
>  	  default, but may need to be changed to get earlycon to work on
>  	  some hardware, such as those that use AMD Carrizo or later SoCs.
>  
> +config X86_SERIAL_DEFINE_OLD_SERIAL_PORTS
> +	bool "Define un-enumerable serial ports"
> +	default y
> +	help
> +	  Say Y here if you want the kernel to assume the precense of built-in

	                                                  presence

> +	  serial ports that do not have a standard enumeration mechanism.
> +	  Platforms that can find all serial ports via mechanisms like ACPI or
> +	  PCI can set this to N.
> +
> +	  If unsure, say Y.
> +
>  if X86_32
>  config X86_BIGSMP
>  	bool "Support for big SMP systems with more than 8 CPUs"



-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ