needrestart icon indicating copy to clipboard operation
needrestart copied to clipboard

Don't check microcode on platforms not known to be supported

Open tomreyn opened this issue 5 years ago • 2 comments

Needrestart 3.1 (via Ubuntu 18.04 LTS package version 3.1-1) on an AMD 17h / Zen system keeps reporting

Failed to check for processor microcode upgrades.

It would seem better to have it only test on platforms currently supported (telling whether this is Intel or AMD or something else entirely seems easy enough), maybe pointing with just a notice (maybe just printed in verbose mode) that microcode checks were automatically disabled for lack of platform support.

tomreyn avatar May 31 '19 15:05 tomreyn

this issue should be fixed by #290, please confirm.

anarcat avatar Nov 21 '23 16:11 anarcat

Thanks for your efforts. The same hardware is since running Debian 12.

I'd like to help confirm your branch fixes the issue, but I'm not sure how to do so. Sorry for dragging this into more of a support domain - no need to respond if you lack the time.

Here's what I tried (blank lines added before shell prompts to improve readability):

$ git clone https://github.com/anarcat/needrestart.git
Cloning into 'needrestart'...
remote: Enumerating objects: 5021, done.
remote: Counting objects: 100% (415/415), done.
remote: Compressing objects: 100% (203/203), done.
remote: Total 5021 (delta 210), reused 402 (delta 210), pack-reused 4606
Receiving objects: 100% (5021/5021), 1.01 MiB | 7.47 MiB/s, done.
Resolving deltas: 100% (2803/2803), done.

$ cd needrestart

$ git checkout ucode-unavail-current
branch 'ucode-unavail-current' set up to track 'origin/ucode-unavail-current'.
Switched to a new branch 'ucode-unavail-current'

$ git pull
Already up to date.

$ ./needrestart --version

needrestart 3.6 - Restart daemons after library updates.

Authors:
  Thomas Liske <[email protected]>

Copyright Holder:
  2013 - 2022 (C) Thomas Liske [http://fiasko-nw.net/~thomas/]

Upstream:
  https://github.com/liske/needrestart

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

$ sudo ./needrestart -v
[main] eval /etc/needrestart/needrestart.conf
[main] needrestart v3.6
[main] running in root mode
[Core] Using UI 'NeedRestart::UI::stdio'...
[main] systemd detected
[Core] #1466 is a NeedRestart::Interp::Python
[Python] #1466: source=/usr/share/unattended-upgrades/unattended-upgrade-shutdown
[Core] #2221 is a NeedRestart::Interp::Perl
[Perl] #2221: could not get a source file, skipping
[Core] #2449 is a NeedRestart::Interp::Perl
[Perl] #2449: could not get a source file, skipping
[ucode] using NeedRestart::uCode::AMD
[ucode] using NeedRestart::uCode::Intel
[uCode/AMD] #0 Failed to open /dev/cpu/0/cpuid (Missed `modprobe cpuid`?): No such file or directory
[uCode/AMD] #0 cpuid 0x00800f11  (/proc/cpuinfo)
[uCode/AMD] #0 running ucode 0x08001138
[uCode/AMD] cpuid 0x00100f80: found processor id 0x00001080
[uCode/AMD] cpuid 0x00100f81: found processor id 0x00001081
[uCode/AMD] cpuid 0x00100f62: found processor id 0x00001062
[uCode/AMD] cpuid 0x00100f23: found processor id 0x00001022
[uCode/AMD] cpuid 0x00100f43: found processor id 0x00001043
[uCode/AMD] cpuid 0x00100f91: found processor id 0x00001081
[uCode/AMD] cpuid 0x00100f2a: found processor id 0x00001020
[uCode/AMD] cpuid 0x00100f63: found processor id 0x00001043
[uCode/AMD] cpuid 0x00100f42: found processor id 0x00001041
[uCode/AMD] cpuid 0x00300f10: found processor id 0x00003010
[uCode/AMD] cpuid 0x00200f31: found processor id 0x00002031
[uCode/AMD] cpuid 0x00100f52: found processor id 0x00001041
[uCode/AMD] cpuid 0x00100fa0: found processor id 0x000010a0
[uCode/AMD] cpuid 0x00100f53: found processor id 0x00001043
[uCode/AMD] cpuid 0x00100f22: found processor id 0x00001022
[uCode/AMD] cpuid 0x00500f10: found processor id 0x00005010
[uCode/AMD] cpuid 0x00500f20: found processor id 0x00005020
[uCode/AMD] processor id 0x00001022: available ucode 0x01000083
[uCode/AMD] processor id 0x00001020: available ucode 0x01000084
[uCode/AMD] processor id 0x00001062: available ucode 0x010000c7
[uCode/AMD] processor id 0x00001043: available ucode 0x010000c8
[uCode/AMD] processor id 0x00001081: available ucode 0x010000d9
[uCode/AMD] processor id 0x00001080: available ucode 0x010000da
[uCode/AMD] processor id 0x00001041: available ucode 0x010000db
[uCode/AMD] processor id 0x000010a0: available ucode 0x010000dc
[uCode/AMD] processor id 0x00002031: available ucode 0x02000032
[uCode/AMD] processor id 0x00003010: available ucode 0x03000027
[uCode/AMD] processor id 0x00005010: available ucode 0x05000029
[uCode/AMD] processor id 0x00005020: available ucode 0x05000119
[uCode/AMD] cpuid 0x00600f20: found processor id 0x00006020
[uCode/AMD] cpuid 0x00610f01: found processor id 0x00006101
[uCode/AMD] cpuid 0x00600f12: found processor id 0x00006012
[uCode/AMD] processor id 0x00006012: available ucode 0x0600063e
[uCode/AMD] processor id 0x00006020: available ucode 0x06000852
[uCode/AMD] processor id 0x00006101: available ucode 0x06001119
[uCode/AMD] cpuid 0x00700f01: found processor id 0x00007001
[uCode/AMD] processor id 0x00007001: available ucode 0x0700010f
[uCode/AMD] cpuid 0x00800f82: found processor id 0x00008082
[uCode/AMD] cpuid 0x00830f10: found processor id 0x00008310
[uCode/AMD] cpuid 0x008a0f00: found processor id 0x00008a00
[uCode/AMD] cpuid 0x00800f12: found processor id 0x00008012
[uCode/AMD] processor id 0x00008082: available ucode 0x0800820d
[uCode/AMD] processor id 0x00008310: available ucode 0x0830107a
[uCode/AMD] processor id 0x00008a00: available ucode 0x08a00008
[uCode/AMD] processor id 0x00008012: available ucode 0x0800126e
[uCode/AMD] cpuid 0x00a10f11: found processor id 0x0000a111
[uCode/AMD] cpuid 0x00a10f12: found processor id 0x0000a112
[uCode/AMD] cpuid 0x00aa0f02: found processor id 0x0000aa02
[uCode/AMD] cpuid 0x00a00f11: found processor id 0x0000a011
[uCode/AMD] cpuid 0x00a00f10: found processor id 0x0000a010
[uCode/AMD] cpuid 0x00a00f12: found processor id 0x0000a012
[uCode/AMD] cpuid 0x00aa0f01: found processor id 0x0000aa01
[uCode/AMD] processor id 0x0000a111: available ucode 0x0a10113e
[uCode/AMD] processor id 0x0000a112: available ucode 0x0a10123e
[uCode/AMD] processor id 0x0000aa02: available ucode 0x0aa00212
[uCode/AMD] processor id 0x0000a011: available ucode 0x0a0011d1
[uCode/AMD] processor id 0x0000a010: available ucode 0x0a001079
[uCode/AMD] processor id 0x0000a012: available ucode 0x0a001234
[uCode/AMD] processor id 0x0000aa01: available ucode 0x0aa00116
Use of uninitialized value $processor in concatenation (.) or string at /usr/share/perl5/NeedRestart/uCode.pm line 61.
[ucode] # did not get available microcode version
[uCode/Intel] #0 current revision: 0x8001138
+ iucode_tool --scan-system
+ grep -oE [^[:space:]]+$
+ sig=found
+ [ -r /sys/devices/system/cpu/cpu0/microcode/processor_flags ]
+ cat /sys/devices/system/cpu/cpu0/microcode/processor_flags
+ filter=-s found,0x0
+ test -r /etc/needrestart/iucode.sh
+ . /etc/needrestart/iucode.sh
+ type bsdtar
+ IUCODE_TOOL_EXTRA_OPTIONS=
+ test -r /etc/default/intel-microcode
+ test  = no
+ [ -r /usr/share/misc/intel-microcode* ]
+ iucode_tool -l -s found,0x0 --ignore-broken -tb /lib/firmware/intel-ucode
+ grep found
Use of uninitialized value $processor in concatenation (.) or string at /usr/share/perl5/NeedRestart/uCode.pm line 61.
[ucode] # did not get available microcode version
[Kernel] Linux: kernel release 6.1.0-13-amd64, kernel version #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29)
[Kernel/Linux] /boot/vmlinuz-6.1.0-13-amd64 => 6.1.0-13-amd64 ([email protected]) #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) [6.1.0-13-amd64]*
[Kernel/Linux] /boot/vmlinuz-6.1.0-12-amd64 => 6.1.0-12-amd64 ([email protected]) #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 (2023-09-07) [6.1.0-12-amd64]
[Kernel/Linux] Expected linux version: 6.1.0-13-amd64

Running kernel seems to be up-to-date.

Failed to check for processor microcode upgrades.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

I also note that in #290, you refer to this issue, #149, as "platforms that are supported but for which a CPU is too new to have an updated firmware available". Since this is an AMD Zen (Gen) 1 CPU, I assume this is not too new a CPU anymore for current Git code, so maybe something else is failing?

tomreyn avatar Nov 23 '23 21:11 tomreyn