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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090504183207.GA14220@elte.hu>
Date:	Mon, 4 May 2009 20:32:07 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Andreas Herrmann <andreas.herrmann3@....com>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: x86: changed output in /proc/cpuinfo for siblings


* Andreas Herrmann <andreas.herrmann3@....com> wrote:

> Commit 7ad728f98162cb1af06a85b2a5fc422dddd4fb78
> (cpumask: x86: convert cpu_sibling_map/cpu_core_map to cpumask_var_t)
> changed the output of /proc/cpuinfo for siblings:
> 
> Example on an AMD Phenom:
> 
>   physical id   : 0
>   siblings : 1
>   core id	   : 3
>   cpu cores  : 4
> 
> Before that commit it was:
> 
>   physical id	: 0
>   siblings : 4
>   core id	   : 3
>   cpu cores  : 4
> 
> Instead of cpu_core_mask it now uses cpu_sibling_mask to count siblings.
> This is due to the following hunk of above commit:
> 
>   --- a/arch/x86/kernel/cpu/proc.c
>   +++ b/arch/x86/kernel/cpu/proc.c
>   @@ -14,7 +14,7 @@ static void show_cpuinfo_core(struct seq_file *m, struct cpuinf
>           if (c->x86_max_cores * smp_num_siblings > 1) {
>                   seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
>                   seq_printf(m, "siblings\t: %d\n",
>   -                          cpus_weight(per_cpu(cpu_core_map, cpu)));
>   +                          cpumask_weight(cpu_sibling_mask(cpu)));
>                   seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id);
>                   seq_printf(m, "cpu cores\t: %d\n", c->booted_cores);
>                   seq_printf(m, "apicid\t\t: %d\n", c->apicid);
> 
> Was this the intention or just a mistake?

it was a mistake, because the impact-line does not mention this 
side-effect:

  Impact: reduce per-cpu size for CONFIG_CPUMASK_OFFSTACK=y

> In the latter case attached patch reverts this hunk.

applied, thanks!

	Ingo
--
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