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: <alpine.DEB.2.20.1711171557160.7700@nanos>
Date:   Fri, 17 Nov 2017 15:59:52 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Prarit Bhargava <prarit@...hat.com>
cc:     linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Piotr Luc <piotr.luc@...el.com>,
        Kan Liang <kan.liang@...el.com>, Borislav Petkov <bp@...e.de>,
        Stephane Eranian <eranian@...gle.com>,
        Arvind Yadav <arvind.yadav.cs@...il.com>,
        Andy Lutomirski <luto@...nel.org>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        He Chen <he.chen@...ux.intel.com>,
        Mathias Krause <minipli@...glemail.com>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>
Subject: Re: [PATCH v6 2/3] x86/topology: Avoid wasting 128k for package id
 array

On Tue, 14 Nov 2017, Prarit Bhargava wrote:
> @@ -389,6 +369,7 @@ void __init smp_store_boot_cpu_info(void)
>  	*c = boot_cpu_data;
>  	c->cpu_index = id;
>  	smp_init_package_map(c, id);
> +	cpu_data(id).set = 1;

What's wrong with

       c->set ?

Aside of that 'set' is not really descriptive. initialized might be better
suited.

>  }
>  
>  /*
> @@ -399,13 +380,15 @@ void smp_store_cpu_info(int id)
>  {
>  	struct cpuinfo_x86 *c = &cpu_data(id);
>  
> -	*c = boot_cpu_data;
> +	if (cpu_data(id).set == 0)
> +		*c = boot_cpu_data;
>  	c->cpu_index = id;
>  	/*
>  	 * During boot time, CPU0 has this setup already. Save the info when
>  	 * bringing up AP or offlined CPU0.
>  	 */
>  	identify_secondary_cpu(c);
> +	cpu_data(id).set = 1;

See above.

No need to resend. I'll fix it up.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ