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: <20120212112306.GA14593@x1.osrc.amd.com>
Date:	Sun, 12 Feb 2012 12:23:06 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Kevin Winchester <kjwinchester@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Randy Dunlap <rdunlap@...otime.net>,
	Nick Bowler <nbowler@...iptictech.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Move per cpu cpu_llc_shared_map to a field in
 struct cpuinfo_x86

On Sat, Feb 11, 2012 at 10:18:53PM -0400, Kevin Winchester wrote:
> > @@ -225,7 +225,6 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
> >        for_each_possible_cpu(i) {
> >                zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
> >                zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
> > -               zalloc_cpumask_var(&per_cpu(cpu_llc_shared_map, i), GFP_KERNEL);
> >        }
> >        set_cpu_sibling_map(0);
> >
> 
> I just realized that I took out a couple of allocations here for
> cpu_llc_shared_map, without replacing them.  Am I leaving
> cpuinfo_x86.llc_shared_map unallocated then, and just writing to
> whatever address that field happened to get?

AFAICT, yes, you need to alloc the cpumask too, i.e. something like

	zalloc_cpumask_var(cpu_info(i).llc_shared_map, GFP_KERNEL);

assuming this happens before the cpumask gets initted in
set_cpu_sibling_map() et al. Just give the whole init path a hard
staring, and try to figure out the proper init sequence.

HTH.

P.S.: I'm currently travelling but will give your patch a run when I get
back, thanks.

-- 
Regards/Gruss,
Boris.
--
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