From 590ac4bd27a04608a87f3f913799a1f166b9a4d5 Mon Sep 17 00:00:00 2001 From: Tobias Fleig Date: Tue, 2 Apr 2024 03:56:22 -0700 Subject: [PATCH] measure: Add .ucode UKI section support This commit adds support for the new ".ucode" UKI section to systemd-measure. It is functionally an initrd and is treated as such by measure. --- man/systemd-measure.xml | 7 ++++--- src/boot/measure.c | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/man/systemd-measure.xml b/man/systemd-measure.xml index 1707e0c7f3..8ea667426e 100644 --- a/man/systemd-measure.xml +++ b/man/systemd-measure.xml @@ -75,9 +75,9 @@ Pre-calculate the expected values seen in PCR register 11 after boot-up of a unified kernel image consisting of the components specified with , , , , - , , , - , see below. Only is - mandatory. (Alternatively, specify to use the current values of PCR + , , , + , , see below. + Only is mandatory. (Alternatively, specify to use the current values of PCR register 11 instead.) @@ -118,6 +118,7 @@ + diff --git a/src/boot/measure.c b/src/boot/measure.c index 789a3deb8c..41fcd5a91a 100644 --- a/src/boot/measure.c +++ b/src/boot/measure.c @@ -92,6 +92,7 @@ static int help(int argc, char *argv[], void *userdata) { " --osrel=PATH Path to os-release file %7$s .osrel\n" " --cmdline=PATH Path to file with kernel command line %7$s .cmdline\n" " --initrd=PATH Path to initrd image file %7$s .initrd\n" + " --ucode=PATH Path to microcode image file %7$s .ucode\n" " --splash=PATH Path to splash bitmap file %7$s .splash\n" " --dtb=PATH Path to Devicetree file %7$s .dtb\n" " --uname=PATH Path to 'uname -r' file %7$s .uname\n" @@ -133,6 +134,7 @@ static int parse_argv(int argc, char *argv[]) { ARG_OSREL, ARG_CMDLINE, ARG_INITRD, + ARG_UCODE, ARG_SPLASH, ARG_DTB, ARG_UNAME, @@ -159,6 +161,7 @@ static int parse_argv(int argc, char *argv[]) { { "osrel", required_argument, NULL, ARG_OSREL }, { "cmdline", required_argument, NULL, ARG_CMDLINE }, { "initrd", required_argument, NULL, ARG_INITRD }, + { "ucode", required_argument, NULL, ARG_UCODE }, { "splash", required_argument, NULL, ARG_SPLASH }, { "dtb", required_argument, NULL, ARG_DTB }, { "uname", required_argument, NULL, ARG_UNAME }, -- 2.25.1