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: <1194333939.3046.36.camel@linux-znh>
Date:	06 Nov 2007 15:25:39 +0800
From:	Zou Nan hai <nanhai.zou@...el.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Andrew Morton <akpm@...l.org>
Subject: [Patch1/2] fix wrong proc cpuinfo on x64


in 2.6.24-rc1 kernel, 
The /proc/cpuinfo display is wrong.

One issue is every processor id appears to be 0.

That is because smp_store_cpu_info will set cpuinfo_x86->cpu_index
to cpu id then call identify_cpu
identify_cpu will call early_identify_cpu which set c->cpu_index back to
0.

This patch set cpu_index after identify_cpu to fix the issue.

Signed-off-by: Zou Nan hai <nanhai.zou@...el.com>

--- linux-2.6.24-rc1/arch/x86/kernel/smpboot_64.c	2007-10-29 22:03:05.000000000 -0400
+++ b/arch/x86/kernel/smpboot_64.c	2007-11-05 22:12:57.000000000 -0500
@@ -141,8 +141,8 @@ static void __cpuinit smp_store_cpu_info
 	struct cpuinfo_x86 *c = &cpu_data(id);
 
 	*c = boot_cpu_data;
-	c->cpu_index = id;
 	identify_cpu(c);
+	c->cpu_index = id;
 	print_cpu_info(c);
 }
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ