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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <168016878002.404.5262105401164408214.tip-bot2@tip-bot2>
Date:   Thu, 30 Mar 2023 09:33:00 -0000
From:   "tip-bot2 for Eric DeVolder" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Miguel Luis <miguel.luis@...cle.com>,
        Boris Ostrovsky <boris.ovstrosky@...cle.com>,
        Eric DeVolder <eric.devolder@...cle.com>,
        "Borislav Petkov (AMD)" <bp@...en8.de>,
        David R <david@...olicited.net>, <stable@...nel.org>,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/urgent] x86/acpi/boot: Correct acpi_is_processor_usable() check

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     fed8d8773b8ea68ad99d9eee8c8343bef9da2c2c
Gitweb:        https://git.kernel.org/tip/fed8d8773b8ea68ad99d9eee8c8343bef9da2c2c
Author:        Eric DeVolder <eric.devolder@...cle.com>
AuthorDate:    Mon, 27 Mar 2023 15:10:26 -04:00
Committer:     Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Thu, 30 Mar 2023 11:07:30 +02:00

x86/acpi/boot: Correct acpi_is_processor_usable() check

The logic in acpi_is_processor_usable() requires the online capable
bit be set for hotpluggable CPUs.  The online capable bit has been
introduced in ACPI 6.3.

However, for ACPI revisions < 6.3 which do not support that bit, CPUs
should be reported as usable, not the other way around.

Reverse the check.

  [ bp: Rewrite commit message. ]

Fixes: e2869bd7af60 ("x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC")
Suggested-by: Miguel Luis <miguel.luis@...cle.com>
Suggested-by: Boris Ostrovsky <boris.ovstrosky@...cle.com>
Signed-off-by: Eric DeVolder <eric.devolder@...cle.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Tested-by: David R <david@...olicited.net>
Cc: <stable@...nel.org>
Link: https://lore.kernel.org/r/20230327191026.3454-2-eric.devolder@oracle.com
---
 arch/x86/kernel/acpi/boot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 7292184..0dac4ab 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -197,7 +197,8 @@ static bool __init acpi_is_processor_usable(u32 lapic_flags)
 	if (lapic_flags & ACPI_MADT_ENABLED)
 		return true;
 
-	if (acpi_support_online_capable && (lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
+	if (!acpi_support_online_capable ||
+	    (lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
 		return true;
 
 	return false;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ