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: <538F1B33.6030706@redhat.com>
Date:	Wed, 04 Jun 2014 09:12:19 -0400
From:	Prarit Bhargava <prarit@...hat.com>
To:	Paul Gortmaker <paul.gortmaker@...driver.com>
CC:	linux-kernel@...r.kernel.org, Oren Twaig <oren@...lemp.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	Borislav Petkov <bp@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <ak@...ux.intel.com>, Dave Jones <davej@...hat.com>,
	Torsten Kaiser <just.for.lkml@...glemail.com>,
	Jan Beulich <JBeulich@...e.com>,
	Jan Kiszka <jan.kiszka@...mens.com>,
	Toshi Kani <toshi.kani@...com>,
	Andrew Jones <drjones@...hat.com>
Subject: Re: [PATCH] x86, Clean up smp_num_siblings calculation



On 06/02/2014 12:30 PM, Paul Gortmaker wrote:

<snip code>

> I wonder if this code is in need of an update?  I recall reading
> this thread:
> 
> http://forum.osdev.org/viewtopic.php?f=1&t=23445
> 
> which suggests that we try CPUID with 0xb, and then 0x4 _before_
> relying on the EBX[23:16] of the older CPUID 0x1.
> 
> AFAICT, the 0xb and 0x4 didn't exist when AP-485 was written ~2002.
> 
> http://datasheets.chipdb.org/Intel/x86/CPUID/24161821.pdf

FWIW, I agree -- this whole chunk can be rewritten and I'll do that in [v3].

> 
> Also, there was a discussion of masking the "ht" flag in /proc/cpuinfo
> for when it is "off" -- since the common sense interpretation of it
> doesn't match the implementation in the specification:
> 
> http://codemonkey.org.uk/2009/11/10/common-hyperthreading-misconception/
> https://lkml.org/lkml/2009/11/13/33
> 
> ...but I don't think that ever happened, even though Ingo thought it
> would probably be OK if there was no obvious fallout.

I have spoken to a few people about this to see if we anticipate any fallout
from this.  The only concern that anyone raised is that some admin might get
confused by the lack of the ht flag in /proc/cpuinfo.  I think that's bogus
because it would have been the admin that disabled HT in the first place.  So
AFAICT it should be safe to do.  I'm going to put together a 2/2 of patch only
for the removal of ht if (smp_num_siblings == 1) and we'll see if the
maintainers like it or not.

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