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-next>] [day] [month] [year] [list]
Message-Id: <20251027141941.3089914-1-punit.agrawal@oss.qualcomm.com>
Date: Mon, 27 Oct 2025 14:19:41 +0000
From: Punit Agrawal <punit.agrawal@....qualcomm.com>
To: catalin.marinas@....com, will@...nel.org
Cc: guohanjun@...wei.com, chenl311@...natelecom.cn,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Punit Agrawal <punit.agrawal@....qualcomm.com>
Subject: [PATCH] arm64: acpi: Fix incorrect check for default console message

bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when
SPCR table is absent") mistakenly assumes acpi_parse_spcr() returning
0 to indicate a failure to parse SPCR and prints a message to the
kernel logs accordingly. In reality acpi_parse_spcr() returns 0 on
success and -ERRNO on failure.

Fix the faulty check to output the correct logging message.

Fixes: bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent")
Signed-off-by: Punit Agrawal <punit.agrawal@....qualcomm.com>
---
Hi,

After sending a patch to fix incorrect parsing of SPCR[0], I was still
seeing inconsistent logging on arm64. The result is this nugget.

Considering the pointless churn - I wondered if it isn't better to
drop the message? If others agree, I can send a patch (and revert
bad3fa2fb920 while at it).

Thanks,
Punit

[0] https://lore.kernel.org/all/20251024123125.1081612-1-punit.agrawal@oss.qualcomm.com/

 arch/arm64/kernel/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
index 7aca29e1d30b..2fba72d51d71 100644
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@ -254,7 +254,7 @@ void __init acpi_boot_table_init(void)
 		 */
 		ret = acpi_parse_spcr(earlycon_acpi_spcr_enable,
 			!param_acpi_nospcr);
-		if (!ret || param_acpi_nospcr || !IS_ENABLED(CONFIG_ACPI_SPCR_TABLE))
+		if (ret < 0 || param_acpi_nospcr || !IS_ENABLED(CONFIG_ACPI_SPCR_TABLE))
 			pr_info("Use ACPI SPCR as default console: No\n");
 		else
 			pr_info("Use ACPI SPCR as default console: Yes\n");
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ