...
 
Commits (20)
# autotools
.deps/
autom4te.cache/
Makefile
......@@ -8,13 +9,19 @@ config.sub
configure
depcomp
install-sh
iucode_tool_config.h.in
iucode_tool_config.h
missing
compile
stamp-h1
config.log
config.status
# generic objects and trash
*.o
*~
*.swp
# specific program objects
iucode_tool_config.h.in
iucode_tool_config.h
/iucode_tool
iucode_tool.8
2018-01-28, iucode_tool v2.3
* iucode_tool(8): document changes to ucode filtering
* iucode_tool: support selecting by ucode revision
Add a third (and optional) parameter to microcode selection filters, to
select microcodes by revision. The revision can be prefixed by the
operators eq: (equal to), lt: (less than), or gt: (greater than).
The revision numbering is signed, but in order to be more user friendly,
since we display revisions as unsigned values in hex, we accept the
range -INT32_MAX to +UINT32_MAX, and convert it to int32_t.
* iucode_tool: add function to parse signed 32-bit integers
Add parse_s32e(), based on parse_u32(). It will be used to parse
microcode revisions in the command line, so it has an extension
that accepts something like 0xfffffffe as an alias for -2.
* iucode_tool: optimize detection of base10 numeric names
* iucode_tool: better handle offline/non-continuous topology
* iucode_tool(8): document changes to --scan-system
* iucode_tool: select scan-system strategy change at runtime
Instead of selecting the scan-system strategy at compile time, enhance the
long-version of the --scan-system option to take an optional argument, and
select the strategy. Available strategies are: 0 (auto), 1 (fast), and 2
(exact). Fast uses just the cpuid instruction and activates all steppings.
Exact will query all processors using the kernel cpuid driver. Auto (the
default) is currently the same as fast. The short option -S is equivalent
to --scan-system=auto. This way, we don't break backwards command line
behavior, and something like "iucode_tool -Sl" will still work. In
--scan-system=exact mode, when a /dev/cpu/#/cpuid scan fails, it will use
the result from the cpuid instruction and also add every other stepping for
any signatures found before the failure.
* gitignore: rearrange, and ignore backup and vim swap files
* iucode_tool: move scan_system_processor() one layer down
* iucode_tool: do not scan-system while parsing
Instead of processing -s and -S/--scan-system while parsing, queue all
filters so that we can call scan_system_processors() later. This was the
only complex operation that was being carried out while parsing the command
line. This change ensures that global options such as -q and -v, that are
not supposed to be sensitive to their position in the command line, will
work as expected.
* iucode_tool: add two command-line parser helpers
* intel_microcode.h: document intel_ucode_status_t sources
* update copyright dates to 2018
2017-08-28, iucode_tool v2.2
* README: update for mixed dat and bin Intel releases
......
v2.3:
* Processor signature scan strategies can now be selected at
runtime, using a new optional argument of the --scan-system
option. It is possible to disable the "exact" scan strategy
(which uses the kernel cpuid device) at build time to reduce the
impact on executable size.
* Microcode updates for a specific signature can now be optionally
selected based on their revision, not just processor flags mask.
v2.2:
* build infrastructure changes: autoconf 2.69 or later, and
automake 1.13 or later are now required. The configure script
......
......@@ -2,8 +2,8 @@
iucode_tool - Intel® 64 and IA-32 processor microcode tool
Version 2.2
August 28th, 2017
Version 2.3
January 28th, 2018
https://gitlab.com/iucode-tool
......
dnl Process this file with autoconf 2.69+ to produce a configure script.
dnl
dnl Copyright (c) 2010-2017 Henrique de Moraes Holschuh
dnl Copyright (c) 2010-2018 Henrique de Moraes Holschuh
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
......@@ -17,11 +17,11 @@ dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AC_PREREQ([2.69])
AC_INIT([iucode_tool], [2.2],
AC_INIT([iucode_tool], [2.3],
[https://gitlab.com/iucode-tool/iucode-tool/issues],
[iucode-tool],
[https://gitlab.com/iucode-tool/iucode-tool/wikis/home])
AC_COPYRIGHT([Copyright (c) 2010-2017 Henrique de Moraes Holschuh])
AC_COPYRIGHT([Copyright (c) 2010-2018 Henrique de Moraes Holschuh])
AC_CONFIG_SRCDIR([iucode_tool.c])
AC_CANONICAL_HOST
......@@ -128,23 +128,32 @@ AC_DEFINE_UNQUOTED(MICROCODE_DIR_DEFAULT, "$MICROCODE_DIR_DEFAULT",
[Path to the kernel microcode firmware directory])
AC_SUBST(MICROCODE_DIR_DEFAULT)
AC_ARG_WITH([cpuid-device-parent],
[AS_HELP_STRING([--with-cpuid-device-parent=PATH],
[per-cpu devices parent directory (/dev/cpu)])],
[AS_IF([test "x$withval" = "x" || test "x$withval" = "xno"],
[AC_ERROR([use --disable-cpuid-device instead of --without-cpuid-device-parent])],
[CPUID_DEVICE_PARENT="$withval"])],
[CPUID_DEVICE_PARENT="/dev/cpu"])
AC_DEFINE_UNQUOTED(CPUID_DEVICE_PARENT, "$CPUID_DEVICE_PARENT",
[path to the per-cpu tree of cpuid devices])
AC_SUBST(CPUID_DEVICE_PARENT)
AC_ARG_WITH([cpuid-device-base],
[AS_HELP_STRING([--with-cpuid-device-base=PATH_FORMAT],
[per-cpu cpuid device path (/dev/cpu/%u/cpuid)])],
[per-cpu cpuid device format string, relative to CPUID_DEVICE_PARENT (%s/cpuid)])],
[AS_IF([test "x$withval" = "x" || test "x$withval" = "xno"],
[AC_ERROR([use --disable-cpuid-device instead of --without-cpuid-device-base])],
[CPUID_DEVICE_BASE="$withval"])],
[CPUID_DEVICE_BASE="/dev/cpu/%u/cpuid"])
[CPUID_DEVICE_BASE="%s/cpuid"])
AC_DEFINE_UNQUOTED(CPUID_DEVICE_BASE, "$CPUID_DEVICE_BASE",
[fprintf base string to the per-cpu cpuid device])
[snprintf format string for the per-cpu cpuid device path, relative to CPUID_DEVICE_NAME])
AC_SUBST(CPUID_DEVICE_BASE)
AC_ARG_ENABLE([cpuid-device],
[AS_HELP_STRING([--enable-cpuid-device],
[use Linux cpuid device and check all cores])],
[AS_IF([test "x$enableval" != "xno"],
[AC_DEFINE(USE_CPUID_DEVICE, [], [Scan every core using Linux cpuid device])])
])
[AS_HELP_STRING([--disable-cpuid-device],
[disable support for the Linux cpuid device (cripples --scan-system=exact)])])
AS_IF([test "x${enable_cpuid_device}" != "xno"],
[AC_DEFINE(USE_CPUID_DEVICE, [], [Support scanning every core using Linux cpuid device])])
AC_ARG_ENABLE([valgrind-build],
[AS_HELP_STRING([--enable-valgrind-build],
......
iucode-tool (2.3-1) unstable; urgency=medium
* New upstream release:
+ Support revision-based matching in microcode update filters
+ Support exact --scan-system as a runtime option (before, it was a
compile-time option and disabled in Debian builds)
-- Henrique de Moraes Holschuh <hmh@debian.org> Sun, 28 Jan 2018 13:46:14 -0200
iucode-tool (2.2-1) unstable; urgency=medium
* New upstream release:
......
......@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006 Tigran Aivazian <[email protected]>
* 2006 Shaohua Li <[email protected]>
* 2010-2017 Henrique de Moraes Holschuh <[email protected]>
* 2010-2018 Henrique de Moraes Holschuh <[email protected]>
*
* Based on Linux kernel Intel Microcode driver v2.6.36-rc3 (1.14)
* Based on Linux microcode.ctl version 1.17
......
......@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006 Tigran Aivazian <[email protected]>
* 2006 Shaohua Li <[email protected]>
* 2010-2017 Henrique de Moraes Holschuh <[email protected]>
* 2010-2018 Henrique de Moraes Holschuh <[email protected]>
*
* Based on Linux kernel Intel Microcode driver v2.6.36-rc3 (1.14)
* Based on Linux microcode.ctl version 1.17
......@@ -35,12 +35,14 @@ typedef enum { /* status result codes */
INTEL_UCODE_BAD_PARAMETERS,
INTEL_UCODE_INVALID_DATA,
INTEL_UCODE_UNKNOWN_FORMAT,
INTEL_UCODE_COUNTEROVERFLOW,
/* only returned by intel_ucode_check_microcode() */
INTEL_UCODE_BAD_EXTENDED_TABLE,
INTEL_UCODE_BAD_EXTENDED_TABLE_CHECKSUM,
INTEL_UCODE_BAD_EXTENDED_SIG_CHECKSUM,
INTEL_UCODE_BAD_CHECKSUM,
/* only returned by the foreach functions */
INTEL_UCODE_CALLBACK_ERROR,
INTEL_UCODE_COUNTEROVERFLOW,
} intel_ucode_status_t;
struct intel_ucode_metadata {
......
.\" hey, Emacs: -*- nroff -*-
.\" Copyright (c) 2010-2017 Henrique de Moraes Holschuh <[email protected]>
.\" Copyright (c) 2010-2018 Henrique de Moraes Holschuh <[email protected]>
.\"
.\" iucode_tool is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
......@@ -15,7 +15,7 @@
.\" along with this program; see the file COPYING. If not, write to
.\" the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.TH IUCODE_TOOL 8 "2016-11-10" "IUCODE_TOOL @[email protected]" "iucode_tool manual"
.TH IUCODE_TOOL 8 "2018-01-28" "IUCODE_TOOL @[email protected]" "iucode_tool manual"
.\" Please update the above date whenever this man page is modified.
.\"
.\" Some roff macros, for reference:
......@@ -179,11 +179,20 @@ microcode data file. This is the default mode of operation.
.TP
.BI "\-s ! | [!]" signature "[," pf_mask "]"
Select microcodes by the specified \fIsignature\fP and \fIprocessor flags
mask\fP (\fIpf_mask\fP). If the \fIprocessor flags mask\fP is specified, it will
select only microcodes that are suitable for at least one of the processor flag
combinations present in the mask.
.BI "\-s ! | [!]" signature "[,[" pf_mask "][,[" lt: "|" eq: "|" gt: "]" revision "]]"
Select microcodes by the specified \fIsignature\fP, \fIprocessor flags mask\fP
(\fIpf_mask\fP), and \fIrevision\fP.
If the \fIprocessor flags mask\fP is specified, it will select only microcodes
that are suitable for at least one of the processor flag combinations present
in the mask.
If the \fIrevision\fP is specified, optionally prefixed by one of the
\(lq\fIeq:\fP\(rq, \(lq\fIlt:\fP\(rq or \(lq\fIgt:\fP\(rq operators, it will
select only microcodes that have that same \fIrevision\fP (if no operator, or
if the \(lq\fIeq:\fP\(rq operator is used), or microcodes that have a
\fIrevision\fP that is less than (\(lq\fIlt:\fP\(rq operator), or greater than
(\(lq\fIgt:\fP\(rq operator), the one specified.
Specify more than once to select more microcodes. This option can be combined
with the \fI\-\-scan\-system\fP option to select more microcodes. If
......@@ -201,7 +210,7 @@ The special notation \fI\-s!\fP (with no \fIsignature\fP parameter) instructs
the non\-negated form of \fI\-s\fP, or using \fI\-\-scan\-system\fP).
.TP
.BR "\-S" ", " "\-\-scan\-system"
.BR "\-S" ", " "\-\-scan\-system" "[=\fImode\fP]"
Select microcodes by scanning online processors on this system for their
signatures.
......@@ -210,10 +219,26 @@ option to select more microcodes. The microcodes selected by
\fI\-\-scan\-system\fP can also be deselected by a later \fI\-s\ !signature\fP
option.
Should the signature scan fail, the program will print a warning to the user
and continue as if \fI\-\-scan\-system\fP had not been specified. This is a
fail-safe condition when \fBiucode_tool\fP is used to install microcode updates
for the next boot.
The optional \fImode\fP argument (accepted only by the long version of the
option) selects the strategy used to scan processors:
.RS
.IP "\fB0\fP or \fBauto\fP"
Currently the same as \fBfast\fP, but this might change in future versions if
Intel ever deploys multi-signature systems that go beyond mixed-stepping. This
is the default mode of operation, for backwards compatibility
with previous versions of \fBiucode_tool\fP.
.IP "\fB1\fP or \fBfast\fP"
Uses the cpuid instruction to detect the signature of the processor
\fBiucode_tool\fP is running on, and selects all steppings for that processor's
type, family and model. Supports mixed-stepping systems.
.IP "\fB2\fP or \fBexact\fP"
Uses kernel drivers to scan the signature of every online processor directly.
This mode supports multi-signature systems. This scan mode will be slow on
large systems with many processors, and likely requires special permissions
(such as running as the root user). Should the scan fail for any reason, as
a fail-safe measure, it will issue an warning and consider all possible
steppings for every signature it did manage to scan successfully.
.RE
.TP
\fB\-\-date\-before\fR=\fIYYYY\-MM\-DD\fR and \fB\-\-date\-after\fR=\fIYYYY\-MM\-DD\fR
......
This diff is collapsed.