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: <1471416172-9463-1-git-send-email-weijg.fnst@cn.fujitsu.com>
Date:	Wed, 17 Aug 2016 14:42:51 +0800
From:	Wei Jiangang <weijg.fnst@...fujitsu.com>
To:	<linux-kernel@...r.kernel.org>
CC:	<x86@...nel.org>, <tglx@...utronix.de>, <mingo@...hat.com>,
	<hpa@...or.com>, <bp@...e.de>,
	Wei Jiangang <weijg.fnst@...fujitsu.com>
Subject: [PATCH 1/2] x86/smpboot: Check APIC ID before setting up default routing

Check the boot APIC ID firstly,
and then setup the default routing of APIC looks better.

And move default_setup_apic_routing() close to apic_bsp_setup(),
which staying in step with the codes in APIC_init_uniprocessor().

Signed-off-by: Wei Jiangang <weijg.fnst@...fujitsu.com>
---
 arch/x86/kernel/smpboot.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 2a6e84a30a54..8216b997c1c9 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1316,14 +1316,13 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
 		break;
 	}
 
-	default_setup_apic_routing();
-
 	if (read_apic_id() != boot_cpu_physical_apicid) {
 		panic("Boot APIC ID in local APIC unexpected (%d vs %d)",
 		     read_apic_id(), boot_cpu_physical_apicid);
 		/* Or can we switch back to PIC here? */
 	}
 
+	default_setup_apic_routing();
 	cpu0_logical_apicid = apic_bsp_setup(false);
 
 	pr_info("CPU%d: ", 0);
-- 
1.9.3



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ