Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-10-31 Thread none

On Sun, 29 Oct 2017, none wrote:

So is there an example ocaml code that can trigger the bug ?


Read the first referece (the INRIA ocaml bug report) throughoutly.  It 
has been public since day one.


And read all references in the updates I sent to that thread too, for 
good measure.  It is not like I added them "just because".


--
 Henrique Holschuh


I did. Are you figuring it’s impossible to successfully compile and 
install the ocaml extprot Library on Debian Jessie? (really many many 
differents compiler errors)
That library is required for triggering the original bug report. As it’s 
impossible to opam install it nor to install it through apt, I’m asking 
for an alternative.




Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-10-30 Thread Jimmy Johnson

On 10/29/2017 01:17 AM, none wrote:

So is there an example ocaml code that can trigger the bug ?


Debian Linux reveals Intel Skylake and Kaby Lake processors have broken 
hyper-threading


http://www.zdnet.com/article/debian-linux-reveals-intel-skylake-kaby-lake-processors-have-broken-hyper-threading/ 


--
Jimmy Johnson

Debian Sid/Testing - KDE Plasma 5.10.5 - AMD A8-7600 - EXT4 at sda8
Registered Linux User #380263



Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-10-29 Thread Henrique de Moraes Holschuh
On Sun, 29 Oct 2017, none wrote:
> So is there an example ocaml code that can trigger the bug ?

Read the first referece (the INRIA ocaml bug report) throughoutly.  It
has been public since day one.

And read all references in the updates I sent to that thread too, for
good measure.  It is not like I added them "just because".

-- 
  Henrique Holschuh



Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-10-29 Thread none

So is there an example ocaml code that can trigger the bug ?



Re: Sound issue WAS: Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-27 Thread deloptes
John Elliot V wrote:

> KDE -> System Settings -> Multimedia (Hardware) -> Audio and Video ->
> Audio Hardware Setup

I was going to say - it is just KDE :D - crap



Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-27 Thread Henrique de Moraes Holschuh
(updated perl script, it now needs the "liblist-moreutils-perl" package)

On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> > This warning advisory is relevant for users of systems with the Intel
> > processors code-named "Skylake" and "Kaby Lake".  These are: the 6th and
> > 7th generation Intel Core processors (desktop, embedded, mobile and
> > HEDT), their related server processors (such as Xeon v5 and Xeon v6), as
> > well as select Intel Pentium processor models.
> 
> Attached, you will find a perl script that can help detect if your
> system is affected or not.  Many thanks to Uwe Kleine-König for
> suggesting, and writing this script.

Uwe Kleine-König was kind enough to update the perl script to fix the
broken hyper-threading detection.  The new version is attached.

NOTE: You may need to install the liblist-moreutils-perl package for the
script to work.

-- 
  Henrique Holschuh


Unsupported File Types Alert.txt
Description: Unsupported File Types Alert.txt


Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-27 Thread Henrique de Moraes Holschuh
(updated perl script, it now needs the "liblist-moreutils-perl" package)

On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> > This warning advisory is relevant for users of systems with the Intel
> > processors code-named "Skylake" and "Kaby Lake".  These are: the 6th and
> > 7th generation Intel Core processors (desktop, embedded, mobile and
> > HEDT), their related server processors (such as Xeon v5 and Xeon v6), as
> > well as select Intel Pentium processor models.
> 
> Attached, you will find a perl script that can help detect if your
> system is affected or not.  Many thanks to Uwe Kleine-König for
> suggesting, and writing this script.

Uwe Kleine-König was kind enough to update the perl script to fix the
broken hyper-threading detection.  The new version is attached.

NOTE: You may need to install the liblist-moreutils-perl package for the
script to work.

-- 
  Henrique Holschuh
#!/usr/bin/perl
# Copyright 2017 Uwe Kleine-König
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation.

use List::MoreUtils 'uniq';

open(my $cpuinfo, ") {
	if (/^$/) {
		push @cpus, { %cpu };
		undef %cpu;
	}
	
	$cpu{'cpunum'} = $1 if /^processor\s*:\s(.*)/;
	$cpu{'vendor'} = $1 if /^vendor_id\s*:\s(.*)/;
	$cpu{'family'} = $1 if /^cpu family\s*:\s(.*)/;
	$cpu{'model'} = $1 if /^model\s*:\s(.*)/;
	$cpu{'stepping'} = $1 if /^stepping\s*:\s(.*)/;
	$cpu{'microcode'} = $1 if /^microcode\s*:\s(.*)/;
	$cpu{'core id'} = $1 if /^core id\s*:\s(.*)/;
}

my $num_cpus = @cpus;
my $num_cores = uniq map { $_->{'core id'} } @cpus;

foreach (@cpus) {
	print "cpu " . $_->{cpunum} . ": ";
	if ($_->{'vendor'} eq "GenuineIntel" and $_->{'family'} == 6) {
		my $model = $_->{'model'};
		if ($model == 78 or $model == 94) {
			if ($_->{'stepping'} eq "3") {
my $microcoderev = $_->{'microcode'};
print "Your CPU is affected, ";
if (hex($microcoderev) >= 0xb9) {
	print "but your microcode is new enough\n";
} elsif ($num_cpus == $num_cores) {
	print "but hyper threading is off, which works around the problem\n";
} else {
	print "you should install the latest intel-microcode\n";
}
			} else {
print "You may need a BIOS/UEFI update (unknown Skylake-Y/H/U/S stepping)\n";
			}
		} elsif ($model == 85 or $model == 142 or $model == 158) {
			print "You may need a BIOS/UEFI update (Kaby Lake, or Skylake-X processor)\n";
			print "Note: Kaby Lake X-series processors (i7-7740X, etc) are not affected\n";
		} else {
			print "You're likely not affected\n";
		}
	} else {
		print "You're not affected\n";
	}
}


Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-26 Thread Henrique de Moraes Holschuh
(updates, hopefully the last ones...)

On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> Fast-forward a few months, and Mark Shinwell noticed the mention of a
> possible fix for a microcode defect with unknown hit-ratio in the
> intel-microcode package changelog.  He matched it to the issues the
> OCaml community were observing, verified that the microcode fix indeed
> solved the OCaml issue, and contacted the Debian maintainer about it.

There are a few factual incorrections in the advisory text, which were
entirely my fault, and for which I apologise.  The corrections are
below:

1. It was one of the OCaml bug reporters (by the handle of ygrek) who
   first noticed that the 20170511 microcode update could be relevant,
   and not Mark Shinwell.

2. Various other bug reporters and OCaml developers, some under request
   from Mark and some by their own volition, helped out and devoted
   substantial time to investigating the issue.

I apologise to those involved: to "ygrek" for misreading the bug report
and attributing to Mark Shinwell the correlation between the SKL150
erratum description and the OCaml compiler issue report; and to all
members of the OCaml community that worked on the issue both in the bug
report and behind the scenes, for not explicitly crediting their effort.

The original OCaml bug report is listed in the references section at the
end of the advisory (and also in this update).

> Related processor signatures and microcode revisions:
> Skylake   : 0x406e3, 0x506e3 (fixed in revision 0xb9/0xba and later,
>   public fix in linux microcode 20170511)
> Skylake   : 0x50654  (no information, erratum listed)
> Kaby Lake : 0x806e9, 0x906e9 (defect still exists in revision 0x48,
>   fix available as a BIOS/UEFI update)

The recently launched "Kaby Lake-X" processors (signature 0x906e9,
socket LGA2066) are documented by Intel as *NOT* being affected by the
KBL095 defect.  This information comes from table 16 of the latest
revision of the "7th gen. Core Family specification update" (which is
listed in the references section).

Please note that the "7th gen. Core i7 X-series processors" (Kaby
Lake-X) both support hyper-threading and share the processor signature
(family, model number and stepping) with "Kaby Lake-H/S" processors.
The tests in the advisory (and also the perl script) will *incorrectly*
report Kaby Lake-X processors as affected.

References:
https://caml.inria.fr/mantis/view.php?id=7452
http://metadata.ftp-master.debian.org/changelogs/non-free/i/intel-microcode/unstable_changelog
https://www.intel.com/content/www/us/en/processors/core/desktop-6th-gen-core-family-spec-update.html
https://www.intel.com/content/www/us/en/processors/core/7th-gen-core-family-spec-update.html
https://www.intel.com/content/www/us/en/processors/xeon/xeon-e3-1200v6-spec-update.html
https://www.intel.com/content/www/us/en/processors/xeon/xeon-e3-1200v5-spec-update.html
https://www.intel.com/content/www/us/en/products/processors/core/6th-gen-x-series-spec-update.html

-- 
  Henrique Holschuh



Sound issue WAS: Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-26 Thread John Elliot V
On 27/06/17 03:16, John Elliot V wrote:
> Hmm. I re-enabled hyper-threading (to test) and sound didn't come back.

After a number of false starts I was able to restore audio by:

 KDE -> System Settings -> Multimedia (Hardware) -> Audio and Video ->
  Audio Hardware Setup

Then in the Hardware section changing Profile from:

 Digital Stereo (IEC958) Output + Analog Stereo Input

To:

 Digital Stereo (HDMI2) Output + Analog Stereo Input

I'm not sure what changed that required me to make this change. Anyway,
happy that sound is working again for me.

Regards,
John Elliot V
-- 
E: j...@jj5.net
P: +61 4 3505 7839
W: https://www.jj5.net/
<>

Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-26 Thread Larry Fletcher

On 06/25/2017 05:19 AM, Henrique de Moraes Holschuh wrote:

This warning advisory is relevant for users of systems with the Intel
processors code-named "Skylake" and "Kaby Lake".  These are: the 6th and
7th generation Intel Core processors (desktop, embedded, mobile and
HEDT), their related server processors (such as Xeon v5 and Xeon v6), as
well as select Intel Pentium processor models.

TL;DR: unfixed Skylake and Kaby Lake processors could, in some
situations, dangerously misbehave when hyper-threading is enabled.
Disable hyper-threading immediately in BIOS/UEFI to work around the
problem.  Read this advisory for instructions about an Intel-provided
fix.


Hyper-threading was enabled in the BIOS and the Skylake processor looks 
good.


lscpu:
Thread(s) per core:2
Model: 94
Stepping:  3

But both of the "intel-microcode" and "amd64-microcode" packages were 
installed, so I removed amd64-microcode.


apt-cache depends amd64-microcode:
amd64-microcode
  Breaks: intel-microcode

Thanks!



Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-26 Thread John Elliot V
On 27/06/17 02:47, John Elliot V wrote:
> I disabled hyper-threading in my BIOS in response to this advisory (I
> have an i7-7700K). Now I get weird graphical artifacts in drop-down
> lists in KDE (they flash between black and white background) and sound
> has stopped working on my system. Can anyone guess why that might be
> happening? I might try re-enabling hyper-threading to see if things go
> back to normal...

Hmm. I re-enabled hyper-threading (to test) and sound didn't come back.
So I disabled hyper-threading again.

Before I disabled hyper-threading the first time I tried updating my
BIOS, and in order to do that my BIOS reconfigured itself to enable some
networking features so it could update the BIOS over the Internet.
Turned out my BIOS was already at the latest version (details are here [1]).

I'm not sure how to diagnose a "no sound" issue. I've checked all the
volume controls I know about, and nothing is mute and/or low volume.
Sound was working this morning, and now, after I changed my
hyper-threading settings, it's not.

Dunno what happened or why. Totally stumped.

Regards,
John Elliot V

[1] https://www.progclub.org/pipermail/programming/2017-June/002892.html

-- 
E: j...@jj5.net
P: +61 4 3505 7839
W: https://www.jj5.net/
<>

Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-26 Thread John Elliot V
I disabled hyper-threading in my BIOS in response to this advisory (I
have an i7-7700K). Now I get weird graphical artifacts in drop-down
lists in KDE (they flash between black and white background) and sound
has stopped working on my system. Can anyone guess why that might be
happening? I might try re-enabling hyper-threading to see if things go
back to normal...

Regards,
John Elliot V
-- 
E: j...@jj5.net
P: +61 4 3505 7839
W: https://www.jj5.net/
<>

Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-25 Thread Henrique de Moraes Holschuh
Minor update on the issue:

The check command provided in the advisory to test for hyper-threading
doesn't work: it will always report hyper-theading as enabled.  A better
command is provided below.

Note: this also means the perl script will give some false-positives.
I apologise for the inconvenience.


On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> Once you know your processor model name, you can check the two lists
> below:
> 
>   * List of Intel processors code-named "Skylake":
> http://ark.intel.com/products/codename/37572/Skylake
> 
>   * List of Intel processors code-named "Kaby Lake":
> http://ark.intel.com/products/codename/82879/Kaby-Lake
> 
> Some of the processors in these two lists are not affected because they
> lack hyper-threading support.  Run the command below in a command line
> shell (e.g. xterm), and it will output a message if hyper-threading is
> supported/enabled:
> 
>   grep -q '^flags.*[[:space:]]ht[[:space:]]' /proc/cpuinfo && \
>   echo "Hyper-threading is supported"

The above test (using "grep") does not work, and will always report that
hyper-threading is enabled.

Please use the "lscpu" utility from the util-linux package in a command
line shell (e.g.  xterm):

lscpu

If the lscpu output reports: "Thread(s) per core: 2", that means
hyper-threading is enabled and supported.

If the lscpu output reports: "Thread(s) per core: 1", that means
hyper-threading either disabled or not supported.  In this case, the
specific defect mentioned in the advisory will not trigger.

-- 
  Henrique Holschuh



Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-25 Thread Henrique de Moraes Holschuh
For the record: the email with the perl script doesn't contain malware.

The "malware" alert came from an extremely badly configured system that
violates every best practice in the field: it sends email to every
original recipient (and not just to local users), and it FORGES its
headers to look like it was sent by the original sender.

-- 
  Henrique Holschuh


signature.asc
Description: Digital signature


Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-25 Thread Henrique de Moraes Holschuh
On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> This warning advisory is relevant for users of systems with the Intel
> processors code-named "Skylake" and "Kaby Lake".  These are: the 6th and
> 7th generation Intel Core processors (desktop, embedded, mobile and
> HEDT), their related server processors (such as Xeon v5 and Xeon v6), as
> well as select Intel Pentium processor models.

Attached, you will find a perl script that can help detect if your
system is affected or not.  Many thanks to Uwe Kleine-König for
suggesting, and writing this script.

-- 
  Henrique Holschuh


Unsupported File Types Alert.txt
Description: Unsupported File Types Alert.txt


Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-25 Thread Henrique de Moraes Holschuh
On Sun, 25 Jun 2017, Henrique de Moraes Holschuh wrote:
> This warning advisory is relevant for users of systems with the Intel
> processors code-named "Skylake" and "Kaby Lake".  These are: the 6th and
> 7th generation Intel Core processors (desktop, embedded, mobile and
> HEDT), their related server processors (such as Xeon v5 and Xeon v6), as
> well as select Intel Pentium processor models.

Attached, you will find a perl script that can help detect if your
system is affected or not.  Many thanks to Uwe Kleine-König for
suggesting, and writing this script.

-- 
  Henrique Holschuh
#!/usr/bin/perl
# Copyright 2017 Uwe Kleine-König
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation.

open(my $cpuinfo, ") {
	if (/^$/) {
		print "cpu $cpunum: ";
		if ($vendor eq "GenuineIntel" and $family == 6) {
			if ($model == 78 or $model == 94) {
if ($stepping eq "3") {
	print "Your CPU is affected, ";
	if (hex($microcoderev) >= 0xb9) {
		print "but your microcode is new enough\n";
	} elsif ($hyperthreading ne "on") {
		print "but hyper threading is off, which works around the problem\n";
	} else {
		print "you should install the latest intel-microcode\n";
	}
} else {
	print "You may need a BIOS/UEFI update (unknown Skylake-Y/H/U/S stepping)\n";
}
			} elsif ($model == 85 or $model == 142 or $model == 158) {
print "You may need a BIOS/UEFI update (Kaby Lake, or Skylake-X processor)\n";
			} else {
print "You're likely not affected\n";
			}
		} else {
			print "You're not affected\n";
		}

		$cpunum = undef;
		$vendor = undef;
		$family = undef;
		$stepping = undef;
		$microcoderev = undef;
		$hyperthreading = undef;

		next;
	}

	$cpunum = $1 if /^processor\s*:\s(.*)/;
	$vendor = $1 if /^vendor_id\s*:\s(.*)/;
	$family = $1 if /^cpu family\s*:\s(.*)/;
	$model = $1 if /^model\s*:\s(.*)/;
	$stepping = $1 if /^stepping\s*:\s(.*)/;
	$microcoderev = $1 if /^microcode\s*:\s(.*)/;

	if (/^flags\s*:/) {
		if (/^flags\s*:.*\bht\b/) {
			$hyperthreading = "on";
		} else {
			$hyperthreading = "off";
		}
	}
}