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: <20250729164958.935066-1-eric.schikschneit@novatechautomation.com>
Date: Tue, 29 Jul 2025 11:49:58 -0500
From: Eric Schikschneit <eric.schikschneit@...atechautomation.com>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
	Eric Schikschneit <eric.schikschneit@...atechautomation.com>
Subject: [PATCH] x86/apic: Silence LAPIC kernel warning on early boot

The code currently issues the user a warning unconditionally:

WARNING: CPU: 0 PID: 0 at /arch/x86/kernel/apic/apic.c:2129
	register_lapic_address+0x3d/0x50
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.62-rt31-yocto-preempt-rt #1
RIP: 0010:register_lapic_address+0x3d/0x50
Call Trace:
 <TASK>
 ? show_regs+0x69/0x80
 ? __warn+0x8e/0x160
 ? register_lapic_address+0x3d/0x50
 ? report_bug+0x171/0x1a0
 ? early_fixup_exception+0xb8/0xd0
 ? do_early_exception+0x1f/0x60
 ? early_idt_handler_common+0x2f/0x40
 ? register_lapic_address+0x3d/0x50
 ? register_lapic_address+0x9/0x50
 ? x86_dtb_init+0xdc/0x2f0
 ? __pfx_acpi_parse_lapic+0x10/0x10
 setup_arch+0x8e1/0xd70
 start_kernel+0x66/0x6e0
 x86_64_start_reservations+0x1c/0x30
 x86_64_start_kernel+0xce/0xe0
 secondary_startup_64_no_verify+0x18a/0x18b
 </TASK>

This warning may lead users to believe they have a early kernel panic,
or major issue stemming from BIOS. This can be avoided unless the
kernel is being passed a non-default value for LAPIC address.

Fixes: 81287ad65da5b8 ("x86/apic: Sanitize APIC address setup")
Signed-off-by: Eric Schikschneit <eric.schikschneit@...atechautomation.com>
---
 arch/x86/kernel/apic/apic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index d73ba5a7b623..e71cc6f776fe 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2078,7 +2078,9 @@ static __init void apic_set_fixmap(bool read_apic)
 void __init register_lapic_address(unsigned long address)
 {
 	/* This should only happen once */
-	WARN_ON_ONCE(mp_lapic_addr);
+	if (address != APIC_DEFAULT_PHYS_BASE)
+		WARN_ON_ONCE(mp_lapic_addr);
+
 	mp_lapic_addr = address;
 
 	if (!x2apic_mode)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ