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: <20100716162517.GF28902@aftab>
Date:	Fri, 16 Jul 2010 18:25:17 +0200
From:	Borislav Petkov <borislav.petkov@....com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Michal Schmidt <mschmidt@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Herrmann3, Andreas" <Andreas.Herrmann3@....com>,
	Shaohua Li <shaohua.li@...el.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 1/2] x86: fix keeping track of AMD C1E

From: "H. Peter Anvin" <hpa@...or.com>
Date: Fri, Jul 16, 2010 at 12:02:32PM -0400

> On 07/16/2010 12:22 AM, Borislav Petkov wrote:
> >>
> >> No, the difference between using a separate variable and the CPU feature 
> >> bit is that CPU feature bit is ANDed across all CPUs, whereas this 
> >> variable is set if it is set on *any* CPU.
> > 
> > ... and that's ok because the MSR bits get set on all cores after BIOS
> > turns on C1E. Let me verify this though.
> > 
> 
> Is there any reason for the OR behavior?  Otherwise, it's just plain
> wrong...

I don't see the need for two things denoting C1E for the very simple
reason: when C1E gets enabled on a machine, one of the bits gets set in
the MSR on each core simultaneously. So if one core sees one of the bits
set, all the remaining cores are seeing them too. The first core that
sees one of the bits in the MSR, sets c1e_detected.

So next time any core does cpu_idle() => c1e_idle(), it switches to
timer broadcast on it since it might go into C1E if all the others
follow.

Frankly, I can't think of a case where we'd need to two things - I
could be missing something. But this workaround is a couple of years
old, maybe Thomas might give us more insight into whether there's a
particular reason for the cpuid flag and the c1e_detected variable.
Thomas?

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

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