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: <20171206125608.4750-1-prarit@redhat.com>
Date:   Wed,  6 Dec 2017 07:56:08 -0500
From:   Prarit Bhargava <prarit@...hat.com>
To:     linux-kernel@...r.kernel.org
Cc:     Prarit Bhargava <prarit@...hat.com>,
        Jakub Kicinski <kubakici@...pl>, netdev@...r.kernel.org,
        Clark Williams <williams@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH] arch/x86: Initialize __max_smt_threads to 1

A single socket, single core, single thread system has __max_smt_threads
set to 0 since smp_callin() is not called.

__max_smt_threads must be a minimum of 1.

Fixes: b1cbacc8663a ("x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation)
Signed-off-by: Prarit Bhargava <prarit@...hat.com>
Cc: Jakub Kicinski <kubakici@...pl>
Cc: netdev@...r.kernel.org
Cc: "netdev@...r.kernel.org"
Cc: Clark Williams <williams@...hat.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: x86@...nel.org
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: https://marc.info/?t=151246092100004&r=1&w=2
---
 arch/x86/kernel/smpboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index eaee15fb7d8b..882c61e1d7a2 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(__max_logical_packages);
 static unsigned int logical_packages __read_mostly;
 
 /* Maximum number of SMT threads on any online core */
-int __max_smt_threads __read_mostly;
+int __read_mostly __max_smt_threads = 1;
 
 /* Flag to indicate if a complete sched domain rebuild is required */
 bool x86_topology_update;
-- 
2.15.0.rc0.39.g2f0e14e64

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ