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]
Date:	Mon, 20 Jul 2015 17:02:40 +0200
From:	Joerg Roedel <jroedel@...e.de>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Joerg Roedel <joro@...tes.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/smpboot: Check for cpu_active on cpu initialization

On Mon, Jul 20, 2015 at 04:46:19PM +0200, Borislav Petkov wrote:
> On Thu, Jul 16, 2015 at 11:17:17AM +0200, Joerg Roedel wrote:
> > The reason is that the cpu_active bit for the new CPU
> > becomes visible significantly later than the cpu_online bit.
> 
> I see
> 
> void set_cpu_online(unsigned int cpu, bool online)
> {
> 	if (online) {
> 		cpumask_set_cpu(cpu, to_cpumask(cpu_online_bits));
> 		cpumask_set_cpu(cpu, to_cpumask(cpu_active_bits));
> 	} else {
> 
> which is called in start_secondary().
> 
> Do you mean that setting the bit in cpu_active_mask gets delayed soo
> much? Because it comes right after setting the bit in cpu_online_mask.

Yes, cpu_active becomes either set a lot later in a KVM guest, when the
host decides to preempt the vCPU right after setting cpu_online, but
before cpu_active is set, or on bare-metal.

I have seen a report where this happens on bare metal, when the change
to the cpu_active bit becomes visible on the other CPU significantly
later than the the cpu_online bit. This happened on a pretty big machine
with 88 cores.


	Joerg

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