Bug#907372: needrestart: complains about microcode updates on systems with microcode for multiple CPUs in initramfs

2018-10-29 Thread Paul Wise
On Mon, 2018-10-29 at 11:17 +0100, Thomas Liske wrote:

> I've patched the helper script to ignore foreign microcode updates. The
> required change was in the helper shell script[1], maybe you give it a try.

Looks like the patch fixed it. FTR, this is the output with the patch:

$ sudo cat /sys/devices/system/cpu/cpu0/microcode/version
0xa
$ sudo sh -x /usr/lib/needrestart/iucode-scan-versions
+ [  = 1 ]
+ iucode_tool --scan-system
+ grep -oE [^[:space:]]+$
+ sig=0x000106e5
+ [ -r /sys/devices/system/cpu/cpu0/microcode/processor_flags ]
+ cat /sys/devices/system/cpu/cpu0/microcode/processor_flags
+ filter=-s 0x000106e5,0x2
+ type bsdtar
+ IUCODE_TOOL_EXTRA_OPTIONS=
+ test -r /etc/default/intel-microcode
+ . /etc/default/intel-microcode
+ IUCODE_TOOL_SCANCPUS=no
+ IUCODE_TOOL_EXTRA_OPTIONS=-s 0x000106e5,0x13 -s 0x00020655,0x92
+ test  = no
+ [ -r /usr/share/misc/intel-microcode* ]
+ iucode_tool -l -s 0x000106e5,0x2 --ignore-broken -s 0x000106e5,0x13 -s 
0x00020655,0x92 -tb /lib/firmware/intel-ucode
+ grep 0x000106e5
  018/001: sig 0x000106e5, pf_mask 0x13, 2018-05-08, rev 0x000a, size 9216

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



signature.asc
Description: This is a digitally signed message part


Bug#907372: needrestart: complains about microcode updates on systems with microcode for multiple CPUs in initramfs

2018-10-29 Thread Thomas Liske


tags 907372 fixed-upstream
thanks


Hi Paul,


I've patched the helper script to ignore foreign microcode updates. The
required change was in the helper shell script[1], maybe you give it a try.

[1] 
https://github.com/liske/needrestart/commit/6975bc59348782d2d57783560cbae976045f54c8


HTH,
Thomas


Paul Wise  writes:

> On Sun, 2018-10-28 at 19:57 +0100, Thomas Liske wrote:
>
>> ... please provide the output of the following commands:
>> 
>> cat /sys/devices/system/cpu/cpu0/microcode/version
>> sh -x /usr/lib/needrestart/iucode-scan-versions
>
> $ sudo cat /sys/devices/system/cpu/cpu0/microcode/version
> 0xa
> $ sudo sh -x /usr/lib/needrestart/iucode-scan-versions
> + [  = 1 ]
> + iucode_tool+  --scan-system
> grep -oE [^[:space:]]+$
> + filter=0x000106e5
> + [ -r /sys/devices/system/cpu/cpu0/microcode/processor_flags ]
> + cat /sys/devices/system/cpu/cpu0/microcode/processor_flags
> + filter=-s 0x000106e5,0x2
> + type bsdtar
> + IUCODE_TOOL_EXTRA_OPTIONS=
> + test -r /etc/default/intel-microcode
> + . /etc/default/intel-microcode
> + IUCODE_TOOL_SCANCPUS=no
> + IUCODE_TOOL_EXTRA_OPTIONS=-s 0x000106e5,0x13 -s 0x00020655,0x92
> + test  = no
> + [ -r /usr/share/misc/intel-microcode* ]
> + exec iucode_tool -l -s 0x000106e5,0x2 -s 0x000106e5,0x13 -s 0x00020655,0x92 
> -tb /lib/firmware/intel-ucode
> microcode bundle 1: /lib/firmware/intel-ucode/06-3f-02.initramfs
> microcode bundle 2: /lib/firmware/intel-ucode/06-17-06
> microcode bundle 3: /lib/firmware/intel-ucode/06-3e-07
> microcode bundle 4: /lib/firmware/intel-ucode/06-56-02.initramfs
> microcode bundle 5: /lib/firmware/intel-ucode/06-25-05
> microcode bundle 6: /lib/firmware/intel-ucode/06-16-01
> microcode bundle 7: /lib/firmware/intel-ucode/06-2d-06
> microcode bundle 8: /lib/firmware/intel-ucode/06-5c-0a
> microcode bundle 9: /lib/firmware/intel-ucode/06-4e-03
> microcode bundle 10: /lib/firmware/intel-ucode/06-8e-0a
> microcode bundle 11: /lib/firmware/intel-ucode/06-9e-0a
> microcode bundle 12: /lib/firmware/intel-ucode/06-55-04
> microcode bundle 13: /lib/firmware/intel-ucode/06-1a-05
> microcode bundle 14: /lib/firmware/intel-ucode/06-55-03
> microcode bundle 15: /lib/firmware/intel-ucode/0f-06-05
> microcode bundle 16: /lib/firmware/intel-ucode/06-5c-02
> microcode bundle 17: /lib/firmware/intel-ucode/06-3d-04.initramfs
> microcode bundle 18: /lib/firmware/intel-ucode/06-1e-05
> microcode bundle 19: /lib/firmware/intel-ucode/06-5c-09
> microcode bundle 20: /lib/firmware/intel-ucode/06-3c-03.initramfs
> microcode bundle 21: /lib/firmware/intel-ucode/06-9e-0b
> microcode bundle 22: /lib/firmware/intel-ucode/06-3a-09.initramfs
> microcode bundle 23: /lib/firmware/intel-ucode/06-1c-0a
> microcode bundle 24: /lib/firmware/intel-ucode/06-1d-01
> microcode bundle 25: /lib/firmware/intel-ucode/0f-04-04
> microcode bundle 26: /lib/firmware/intel-ucode/0f-06-04
> microcode bundle 27: /lib/firmware/intel-ucode/0f-06-02
> microcode bundle 28: /lib/firmware/intel-ucode/0f-04-0a
> microcode bundle 29: /lib/firmware/intel-ucode/06-0f-07
> microcode bundle 30: /lib/firmware/intel-ucode/06-0f-02
> microcode bundle 31: /lib/firmware/intel-ucode/06-56-05
> microcode bundle 32: /lib/firmware/intel-ucode/06-0f-0b
> microcode bundle 33: /lib/firmware/intel-ucode/06-7a-01
> microcode bundle 34: /lib/firmware/intel-ucode/06-2f-02
> microcode bundle 35: /lib/firmware/intel-ucode/06-17-07
> microcode bundle 36: /lib/firmware/intel-ucode/06-5f-01
> microcode bundle 37: /lib/firmware/intel-ucode/06-17-0a
> microcode bundle 38: /lib/firmware/intel-ucode/06-3e-04
> microcode bundle 39: /lib/firmware/intel-ucode/0f-04-03
> microcode bundle 40: /lib/firmware/intel-ucode/06-9e-09
> microcode bundle 41: /lib/firmware/intel-ucode/0f-06-08
> microcode bundle 42: /lib/firmware/intel-ucode/06-56-03
> microcode bundle 43: /lib/firmware/intel-ucode/06-56-04
> microcode bundle 44: /lib/firmware/intel-ucode/06-1a-04
> microcode bundle 45: /lib/firmware/intel-ucode/06-3e-06
> microcode bundle 46: /lib/firmware/intel-ucode/0f-04-01
> microcode bundle 47: /lib/firmware/intel-ucode/0f-04-08
> microcode bundle 48: /lib/firmware/intel-ucode/06-0f-0a
> microcode bundle 49: /lib/firmware/intel-ucode/06-46-01.initramfs
> microcode bundle 50: /lib/firmware/intel-ucode/06-2d-07
> microcode bundle 51: /lib/firmware/intel-ucode/06-2e-06
> microcode bundle 52: /lib/firmware/intel-ucode/0f-04-07
> microcode bundle 53: /lib/firmware/intel-ucode/06-0f-06
> microcode bundle 54: /lib/firmware/intel-ucode/06-8e-09
> microcode bundle 55: /lib/firmware/intel-ucode/06-0f-0d
> microcode bundle 56: /lib/firmware/intel-ucode/06-2a-07
> microcode bundle 57: /lib/firmware/intel-ucode/06-25-02
> microcode bundle 58: /lib/firmware/intel-ucode/0f-04-09
> microcode bundle 59: /lib/firmware/intel-ucode/06-45-01.initramfs
> microcode bundle 60: /lib/firmware/intel-ucode/06-47-01.initramfs
> microcode bundle 61: /lib/firmware/intel-ucode/06-4f-01.initramfs
> microcode bundle 62: 

Bug#907372: needrestart: complains about microcode updates on systems with microcode for multiple CPUs in initramfs

2018-10-28 Thread Paul Wise
On Sun, 2018-10-28 at 19:57 +0100, Thomas Liske wrote:

> ... please provide the output of the following commands:
> 
> cat /sys/devices/system/cpu/cpu0/microcode/version
> sh -x /usr/lib/needrestart/iucode-scan-versions

$ sudo cat /sys/devices/system/cpu/cpu0/microcode/version
0xa
$ sudo sh -x /usr/lib/needrestart/iucode-scan-versions
+ [  = 1 ]
+ iucode_tool+  --scan-system
grep -oE [^[:space:]]+$
+ filter=0x000106e5
+ [ -r /sys/devices/system/cpu/cpu0/microcode/processor_flags ]
+ cat /sys/devices/system/cpu/cpu0/microcode/processor_flags
+ filter=-s 0x000106e5,0x2
+ type bsdtar
+ IUCODE_TOOL_EXTRA_OPTIONS=
+ test -r /etc/default/intel-microcode
+ . /etc/default/intel-microcode
+ IUCODE_TOOL_SCANCPUS=no
+ IUCODE_TOOL_EXTRA_OPTIONS=-s 0x000106e5,0x13 -s 0x00020655,0x92
+ test  = no
+ [ -r /usr/share/misc/intel-microcode* ]
+ exec iucode_tool -l -s 0x000106e5,0x2 -s 0x000106e5,0x13 -s 0x00020655,0x92 
-tb /lib/firmware/intel-ucode
microcode bundle 1: /lib/firmware/intel-ucode/06-3f-02.initramfs
microcode bundle 2: /lib/firmware/intel-ucode/06-17-06
microcode bundle 3: /lib/firmware/intel-ucode/06-3e-07
microcode bundle 4: /lib/firmware/intel-ucode/06-56-02.initramfs
microcode bundle 5: /lib/firmware/intel-ucode/06-25-05
microcode bundle 6: /lib/firmware/intel-ucode/06-16-01
microcode bundle 7: /lib/firmware/intel-ucode/06-2d-06
microcode bundle 8: /lib/firmware/intel-ucode/06-5c-0a
microcode bundle 9: /lib/firmware/intel-ucode/06-4e-03
microcode bundle 10: /lib/firmware/intel-ucode/06-8e-0a
microcode bundle 11: /lib/firmware/intel-ucode/06-9e-0a
microcode bundle 12: /lib/firmware/intel-ucode/06-55-04
microcode bundle 13: /lib/firmware/intel-ucode/06-1a-05
microcode bundle 14: /lib/firmware/intel-ucode/06-55-03
microcode bundle 15: /lib/firmware/intel-ucode/0f-06-05
microcode bundle 16: /lib/firmware/intel-ucode/06-5c-02
microcode bundle 17: /lib/firmware/intel-ucode/06-3d-04.initramfs
microcode bundle 18: /lib/firmware/intel-ucode/06-1e-05
microcode bundle 19: /lib/firmware/intel-ucode/06-5c-09
microcode bundle 20: /lib/firmware/intel-ucode/06-3c-03.initramfs
microcode bundle 21: /lib/firmware/intel-ucode/06-9e-0b
microcode bundle 22: /lib/firmware/intel-ucode/06-3a-09.initramfs
microcode bundle 23: /lib/firmware/intel-ucode/06-1c-0a
microcode bundle 24: /lib/firmware/intel-ucode/06-1d-01
microcode bundle 25: /lib/firmware/intel-ucode/0f-04-04
microcode bundle 26: /lib/firmware/intel-ucode/0f-06-04
microcode bundle 27: /lib/firmware/intel-ucode/0f-06-02
microcode bundle 28: /lib/firmware/intel-ucode/0f-04-0a
microcode bundle 29: /lib/firmware/intel-ucode/06-0f-07
microcode bundle 30: /lib/firmware/intel-ucode/06-0f-02
microcode bundle 31: /lib/firmware/intel-ucode/06-56-05
microcode bundle 32: /lib/firmware/intel-ucode/06-0f-0b
microcode bundle 33: /lib/firmware/intel-ucode/06-7a-01
microcode bundle 34: /lib/firmware/intel-ucode/06-2f-02
microcode bundle 35: /lib/firmware/intel-ucode/06-17-07
microcode bundle 36: /lib/firmware/intel-ucode/06-5f-01
microcode bundle 37: /lib/firmware/intel-ucode/06-17-0a
microcode bundle 38: /lib/firmware/intel-ucode/06-3e-04
microcode bundle 39: /lib/firmware/intel-ucode/0f-04-03
microcode bundle 40: /lib/firmware/intel-ucode/06-9e-09
microcode bundle 41: /lib/firmware/intel-ucode/0f-06-08
microcode bundle 42: /lib/firmware/intel-ucode/06-56-03
microcode bundle 43: /lib/firmware/intel-ucode/06-56-04
microcode bundle 44: /lib/firmware/intel-ucode/06-1a-04
microcode bundle 45: /lib/firmware/intel-ucode/06-3e-06
microcode bundle 46: /lib/firmware/intel-ucode/0f-04-01
microcode bundle 47: /lib/firmware/intel-ucode/0f-04-08
microcode bundle 48: /lib/firmware/intel-ucode/06-0f-0a
microcode bundle 49: /lib/firmware/intel-ucode/06-46-01.initramfs
microcode bundle 50: /lib/firmware/intel-ucode/06-2d-07
microcode bundle 51: /lib/firmware/intel-ucode/06-2e-06
microcode bundle 52: /lib/firmware/intel-ucode/0f-04-07
microcode bundle 53: /lib/firmware/intel-ucode/06-0f-06
microcode bundle 54: /lib/firmware/intel-ucode/06-8e-09
microcode bundle 55: /lib/firmware/intel-ucode/06-0f-0d
microcode bundle 56: /lib/firmware/intel-ucode/06-2a-07
microcode bundle 57: /lib/firmware/intel-ucode/06-25-02
microcode bundle 58: /lib/firmware/intel-ucode/0f-04-09
microcode bundle 59: /lib/firmware/intel-ucode/06-45-01.initramfs
microcode bundle 60: /lib/firmware/intel-ucode/06-47-01.initramfs
microcode bundle 61: /lib/firmware/intel-ucode/06-4f-01.initramfs
microcode bundle 62: /lib/firmware/intel-ucode/06-3f-04.initramfs
microcode bundle 63: /lib/firmware/intel-ucode/0f-03-04
microcode bundle 64: /lib/firmware/intel-ucode/06-5e-03
microcode bundle 65: /lib/firmware/intel-ucode/06-1c-02
selected microcodes:
  018/001: sig 0x000106e5, pf_mask 0x13, 2018-05-08, rev 0x000a, size 9216
  005/001: sig 0x00020655, pf_mask 0x92, 2018-04-23, rev 0x0007, size 4096

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



signature.asc
Description: This is a digitally signed message part


Bug#907372: needrestart: complains about microcode updates on systems with microcode for multiple CPUs in initramfs

2018-10-28 Thread Thomas Liske


tags 907372 upstream
thanks


Hi Paul,

Paul Wise  writes:

> Package: needrestart
> Version: 3.3-1
> Severity: normal
> File: /usr/lib/needrestart/iucode-scan-versions
>
> I have a system that changes between two different CPUs occasionally.
> I have a system that boots a different computer at almost every boot.
>
> To get the right microcode loaded, both turn off CPU scanning:
>
> /etc/default/intel-microcode:
> IUCODE_TOOL_SCANCPUS=no
>
> The first one also restricts installed microcode to the used CPUs:
>
> /etc/default/intel-microcode:
> IUCODE_TOOL_EXTRA_OPTIONS="-s 0x000X,0xXX -s 0x000X,0xXX"

I fear that this code path (using -s in IUCODE_TOOL_EXTRA_OPTIONS) is
hardly tested. For the beginning could you please provide the output of
the following commands:

cat /sys/devices/system/cpu/cpu0/microcode/version
sh -x /usr/lib/needrestart/iucode-scan-versions


Thanks,
Thomas

-- 

::  WWW:https://fiasko-nw.net/~thomas/  ::
   :::  Jabber:   xmpp:tho...@jabber.fiasko-nw.net  :::
::  flickr: https://www.flickr.com/photos/laugufe/  ::



Bug#907372: needrestart: complains about microcode updates on systems with microcode for multiple CPUs in initramfs

2018-08-26 Thread Paul Wise
Package: needrestart
Version: 3.3-1
Severity: normal
File: /usr/lib/needrestart/iucode-scan-versions

I have a system that changes between two different CPUs occasionally.
I have a system that boots a different computer at almost every boot.

To get the right microcode loaded, both turn off CPU scanning:

/etc/default/intel-microcode:
IUCODE_TOOL_SCANCPUS=no

The first one also restricts installed microcode to the used CPUs:

/etc/default/intel-microcode:
IUCODE_TOOL_EXTRA_OPTIONS="-s 0x000X,0xXX -s 0x000X,0xXX"

For both of these, the needrestart microcode checking complains
that the running microcode is at a different revision to the initrd
microcode. The revision that the first system prints is the revision
for the other CPU that is not currently booted. The revision that the
second system prints is a revision for the another random CPU.

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 
'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 
'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.17.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), 
LANGUAGE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages needrestart depends on:
ii  binutils   2.31.1-4
ii  dpkg   1.19.0.5+b1
ii  gettext-base   0.19.8.1-7
ii  libintl-perl   1.26-2
ii  libmodule-find-perl0.13-1
ii  libmodule-scandeps-perl1.24-1
ii  libproc-processtable-perl  0.55-1
ii  libsort-naturally-perl 1.03-2
ii  libterm-readkey-perl   2.37-1+b2
ii  perl   5.26.2-7
ii  xz-utils   5.2.2-1.3

Versions of packages needrestart recommends:
ii  libpam-systemd  239-7

Versions of packages needrestart suggests:
ii  iucode-tool  2.3.1-1
ii  libnotify-bin0.7.7-3
ii  needrestart-session  0.3-5

-- no debconf information

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



signature.asc
Description: This is a digitally signed message part