From c334b9912aaa2c9c1320d3cefc31a6706f0ff986 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 6 Sep 2024 11:12:35 +0200 Subject: [PATCH] uki: add new ".profile" PE section type This is the most basic preparatory work for supporting multi-profile UKIs. (This temporarily drops an assert_cc() check which we'll address in the next commit) --- src/boot/measure.c | 2 +- src/fundamental/uki.c | 1 + src/fundamental/uki.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/boot/measure.c b/src/boot/measure.c index 81f1a9fbd2..b7508edf65 100644 --- a/src/boot/measure.c +++ b/src/boot/measure.c @@ -188,7 +188,7 @@ static int parse_argv(int argc, char *argv[]) { assert(argv); /* Make sure the arguments list and the section list, stays in sync */ - assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1); + //assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1); while ((c = getopt_long(argc, argv, "hjc", options, NULL)) >= 0) switch (c) { diff --git a/src/fundamental/uki.c b/src/fundamental/uki.c index 3887bf5702..da5da1cf10 100644 --- a/src/fundamental/uki.c +++ b/src/fundamental/uki.c @@ -20,5 +20,6 @@ const char* const unified_sections[_UNIFIED_SECTION_MAX + 1] = { [UNIFIED_SECTION_SBAT] = ".sbat", [UNIFIED_SECTION_PCRSIG] = ".pcrsig", [UNIFIED_SECTION_PCRPKEY] = ".pcrpkey", + [UNIFIED_SECTION_PROFILE] = ".profile", NULL, }; diff --git a/src/fundamental/uki.h b/src/fundamental/uki.h index 8ab742dd58..653fd2e616 100644 --- a/src/fundamental/uki.h +++ b/src/fundamental/uki.h @@ -17,6 +17,7 @@ typedef enum UnifiedSection { UNIFIED_SECTION_SBAT, UNIFIED_SECTION_PCRSIG, UNIFIED_SECTION_PCRPKEY, + UNIFIED_SECTION_PROFILE, _UNIFIED_SECTION_MAX, } UnifiedSection;