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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5d54942-f280-40ab-b445-00b6dc610a8e@shenghaoyang.info>
Date: Thu, 15 Jan 2026 01:09:40 +0800
From: Shenghao Yang <me@...nghaoyang.info>
To: Borislav Petkov <bp@...en8.de>
Cc: x86@...nel.org, Jonathan Corbet <corbet@....net>,
 "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
 Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-acpi@...r.kernel.org
Subject: Re: [PATCH] x86/acpi: Add acpi=spcr to use SPCR-provided default
 console

Hi,

On 14/1/26 23:46, Borislav Petkov wrote:
> On Sun, Dec 28, 2025 at 05:22:22PM +0800, Shenghao Yang wrote:
>> Commit 0231d00082f6 ("ACPI: SPCR: Make SPCR available to x86")
>> made SPCR available as an earlycon option on x86 but did not add
>> it as a preferred console to avoid breaking existing setups -
> 
> No one has noticed AFAICT since 2018 (this commit's date).
> 
> Also:
> 
>         /* Do not enable ACPI SPCR console by default */
>         acpi_parse_spcr(earlycon_acpi_spcr_enable, false);
> 
> Looks nicely conservative to me.
> 

Thanks for taking a look.

>> users have to round trip the dumped console options
>> ("SPCR: console: uart,io,0x3f8,115200") back via their
>> bootloader.
> 
> I don't know what that means.

The kernel decodes the SPCR table and dumps the settings to use
the firmware preferred console in the kernel log:

[    0.005091] ACPI: SPCR 0x000000007FFB5000 000059 (v04 ALASKA A M I    01072009 INTL 20250404)
[    0.073387] ACPI: SPCR: console: uart,io,0x3f8,115200

We've been inserting the dumped config into the kernel command 
line and rebooting on first boot (e.g. console=uart,io,0x3f8,115200),
but would love to avoid this loop.

> 
>> Let users opt in so serial console configuration can be made
>> automatic.
> 
> Why?

It's easier this way for larger fleets - we don't want to manage
hardware specific serial console settings on the kernel command line
if the firmware is already capable of telling us the correct ones.

> 
> Text says:
> 
> 	[X86] When used with no options the early console is
> 	determined by the ACPI SPCR table.
> 
> But the code doesn't enable the SPCR console by default.

If earlycon is specified on the command line the console from SPCR
is used, but only as a boot console. It's not present in
/proc/consoles.

It is possible to retain it with keep_bootcon, but that uses the
less efficient (in the 8250 case) 8250_early driver.

> 
> I have no clue what this patch is trying to do.
> 

In 0231d00082f6 ("ACPI: SPCR: Make SPCR available to x86") the SPCR
console is only added as an option for earlycon but not as an ordinary
console so users don't see console output changes.  

The patch adds an opt in so we can get the SPCR console added as
an ordinary console.

Thanks,

Shenghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ