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>] [day] [month] [year] [list]
Message-ID: <Z/WLCdZlg4sebQ6i@kraken>
Date: Tue, 08 Apr 2025 20:46:05 +0000
From: dmkhn@...ton.me
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v1 1/1] x86/early_printk: Use 'mmio32' for consistency

On Mon, Apr 07, 2025 at 08:22:14PM +0300, Andy Shevchenko wrote:
> First of all, using 'mmio' prevents proper implementation of 8-bit accessors.
> Second, it's simply inconsistent with uart8250 set of options. Rename it to
> 'mmio32'. While at it, remove rather misleading comment in the documentation.
> >From now on mmio32 is self-explanatory and pciserial supports not only 32-bit
> MMIO accessors.
> 
> Fixes: 3181424aeac2 ("x86/early_printk: Add support for MMIO-based UARTs")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Reviewed-by: Denis Mukhin <dmukhin@...d.com>

> ---
>  Documentation/admin-guide/kernel-parameters.txt | 5 +----
>  arch/x86/kernel/early_printk.c                  | 6 +++---
>  2 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 76e538c77e31..d9fd26b95b34 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -1407,18 +1407,15 @@
>  			earlyprintk=serial[,0x...[,baudrate]]
>  			earlyprintk=ttySn[,baudrate]
>  			earlyprintk=dbgp[debugController#]
> +			earlyprintk=mmio32,membase[,{nocfg|baudrate}]
>  			earlyprintk=pciserial[,force],bus:device.function[,{nocfg|baudrate}]
>  			earlyprintk=xdbc[xhciController#]
>  			earlyprintk=bios
> -			earlyprintk=mmio,membase[,{nocfg|baudrate}]
>  
>  			earlyprintk is useful when the kernel crashes before
>  			the normal console is initialized. It is not enabled by
>  			default because it has some cosmetic problems.
>  
> -			Only 32-bit memory addresses are supported for "mmio"
> -			and "pciserial" devices.
> -
>  			Use "nocfg" to skip UART configuration, assume
>  			BIOS/firmware has configured UART correctly.
>  
> diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> index b70e6e99fb17..dc053641698c 100644
> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
> @@ -424,10 +424,10 @@ static int __init setup_early_printk(char *buf)
>  	keep = (strstr(buf, "keep") != NULL);
>  
>  	while (*buf != '\0') {
> -		if (!strncmp(buf, "mmio", 4)) {
> -			early_mmio_serial_init(buf + 4);
> +		if (!strncmp(buf, "mmio32", 6)) {
> +			buf += 6;
> +			early_mmio_serial_init(buf);
>  			early_console_register(&early_serial_console, keep);
> -			buf += 4;
>  		}
>  		if (!strncmp(buf, "serial", 6)) {
>  			buf += 6;
> -- 
> 2.47.2
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ