pcrlock: error out if requested PCR was dropped (#43260)

- --strict=/--full moved to the OPTION_LONG() parser framework that
replaced getopt in the meantime
- the is-supported commit is dropped, main grew that verb independently.
That also gets rid of the early tpm2_support() gate that broke CI back
then, and TEST-70-TPM2 runs with a software TPM these days anyway
- special_glyph() → glyph() renames
- the log table PCR filter needs an EVENT_LOG_RECORD_IS_PCR() guard now
that the event log has NV-index records
This commit is contained in:
Yu Watanabe
2026-08-05 13:17:21 +09:00
committed by GitHub
3 changed files with 126 additions and 27 deletions
+6 -4
View File
@@ -117,10 +117,12 @@ if [[ -n "$SD_STUB" ]]; then
[[ "$uki_stdin" == "$uki_pipe" ]]
fi
PIN=huhu "$SD_PCRLOCK" make-policy --pcr="$PCRS" --recovery-pin=query
# Repeat immediately (this call will have to reuse the nvindex, rather than create it)
"$SD_PCRLOCK" make-policy --pcr="$PCRS"
"$SD_PCRLOCK" make-policy --pcr="$PCRS" --force
if "$SD_PCRLOCK" is-supported; then
PIN=huhu "$SD_PCRLOCK" make-policy --pcr="$PCRS" --recovery-pin=query
# Repeat immediately (this call will have to reuse the nvindex, rather than create it)
"$SD_PCRLOCK" make-policy --pcr="$PCRS"
"$SD_PCRLOCK" make-policy --pcr="$PCRS" --force
fi
img="/tmp/pcrlock.img"
truncate -s 20M "$img"