aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorEric Richter <erichte@linux.ibm.com>2021-11-04 12:03:04 -0500
committerCédric Le Goater <clg@kaod.org>2021-11-04 18:07:19 +0100
commit5cb28dd14e202b66e95d5420923a157fe9639132 (patch)
tree80d74b02f7ce5e31c718cb402ae36eca72613f38 /hdata
parente445bba72834749200c6073096e66829dddfe624 (diff)
downloadskiboot-5cb28dd14e202b66e95d5420923a157fe9639132.zip
skiboot-5cb28dd14e202b66e95d5420923a157fe9639132.tar.gz
skiboot-5cb28dd14e202b66e95d5420923a157fe9639132.tar.bz2
secvar/secboot_tpm: correctly reset the control index on secboot format
When the SECBOOT partition is formatted, the bank hash stored in the control TPM NV index must be updated to match, or else we will immediately fail to load the freshly formatted data at the .load_bank() step. However, while the secboot_format() function does calculate and update the bank hash, it only writes the new hash for bank 0. It does not update the value for bank 1, or set the current active bank. This works as expected if the active bank bit happens to be set to 0. On the other hand, if the active bit is set to 1, the freshly formatted bank 1 will be compared against the unchanged bank hash in bank 1 at the load step, therefore causing an error. This patch fixes this issue by also setting the active bit to 0 to match the freshly calculated hash. Signed-off-by: Eric Richter <erichte@linux.ibm.com> Tested-by: Nick Child <nick.child@ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hdata')
0 files changed, 0 insertions, 0 deletions