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: <20250109184015.1674388-1-romank@linux.microsoft.com>
Date: Thu,  9 Jan 2025 10:40:15 -0800
From: Roman Kisel <romank@...ux.microsoft.com>
To: bp@...en8.de,
	dave.hansen@...ux.intel.com,
	hpa@...or.com,
	ilpo.jarvinen@...ux.intel.com,
	mingo@...hat.com,
	robh@...nel.org,
	sboyd@...nel.org,
	ssengar@...ux.microsoft.com,
	tglx@...utronix.de,
	usamaarif642@...il.com,
	x86@...nel.org,
	linux-kernel@...r.kernel.org
Cc: apais@...rosoft.com,
	benhill@...rosoft.com,
	ssengar@...rosoft.com,
	sunilmut@...rosoft.com,
	vdso@...bites.dev
Subject: [PATCH] x86/of: Don't log error on the missing IO-APIC unconditionally

The x86 OF code reports the missing IO-APIC wihtout any
checks whether the IO-APIC presence is required or not.
That is due to that part of the code being dovetailed to
the Intel MID platform.

Check if the IO-APIC must be available. Log the error only
when the IO-APIC is expected to be present.

Signed-off-by: Roman Kisel <romank@...ux.microsoft.com>
---
 arch/x86/kernel/devicetree.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 59d23cdf4ed0..5b3b47930d1c 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -47,6 +47,15 @@ static struct of_device_id __initdata ce4100_ids[] = {
 	{},
 };
 
+static bool falconfalls_compatible(void)
+{
+	if (!of_have_populated_dt())
+		return false;
+
+	return of_flat_dt_is_compatible(
+			of_get_flat_dt_root(), "intel,falconfalls");
+}
+
 static int __init add_bus_probe(void)
 {
 	if (!of_have_populated_dt())
@@ -259,12 +268,20 @@ static void __init dtb_ioapic_setup(void)
 
 	for_each_compatible_node(dn, NULL, "intel,ce4100-ioapic")
 		dtb_add_ioapic(dn);
+	if (!nr_ioapics && falconfalls_compatible())
+		pr_err("Error: No information about IO-APIC in OF.\n");
 
-	if (nr_ioapics) {
+	if (nr_ioapics)
 		of_ioapic = 1;
-		return;
-	}
-	pr_err("Error: No information about IO-APIC in OF.\n");
+
+	/*
+	 * At this point, it might so happen that no IO-APIC has been discovered.
+	 *
+	 * A general assumption would be that most x86 boards have IO-APIC,
+	 * yet that is not something the kernel should report as a firmware
+	 * bug unconditionally as there are setups (VMs would be an easy example)
+	 * that are able to employ other means of interrupt routing.
+	 */
 }
 #else
 static void __init dtb_ioapic_setup(void) {}

base-commit: eea6e4b4dfb8859446177c32961c96726d0117be
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ