Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAPI: Eventlog add H-CRTM and different locality support. #2685

Conversation

JuergenReppSIT
Copy link
Member

  • For H-CRTM events pcr0 has to be initialized with 4.
  • A different locality can be set in an event with a startup locality signature.

To enable the implementation of a corresponding unit test the function ifapi_check_profile_pcr_selection was splitted into two functions. The new function ifapi_calculate_pcrs is used in the unit test to check whether the expected pcr0 is computed from the event list computed from the binary H-CRTM firmware file.
Fixes #2672.

Signed-off-by: Juergen Repp juergen_repp@web.de

@JuergenReppSIT JuergenReppSIT force-pushed the fapi-fix-eventlog-hcrtm-localiity branch 8 times, most recently from 35496a2 to 230491d Compare August 22, 2023 08:15
* For H-CRTM events pcr0 has to be initialized with 4.
* A different locality can be set in an event with a
  startup locality signature.

To enable the implementation of a corresponding unit test
the function ifapi_check_profile_pcr_selection was splitted
into two functions. The new function ifapi_calculate_pcrs
is used in the unit test to check whether the expected
pcr0 is computed from the event list computed from the
binary H-CRTM firmware file. The pcr extension during
parsing the firmware was removed. The computed pcr values
were not used. The computation of the pcrs based on
the replay of the eventlog is caried out by the new
function ifapi_calculate_pcrs.

Fixes tpm2-software#2672.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
@JuergenReppSIT JuergenReppSIT force-pushed the fapi-fix-eventlog-hcrtm-localiity branch from 230491d to 95a50b1 Compare August 25, 2023 19:22
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #2685 (95a50b1) into master (b7bad34) will increase coverage by 0.03%.
The diff coverage is 92.75%.

@@            Coverage Diff             @@
##           master    #2685      +/-   ##
==========================================
+ Coverage   82.57%   82.61%   +0.03%     
==========================================
  Files         368      368              
  Lines       42980    42991      +11     
==========================================
+ Hits        35491    35517      +26     
+ Misses       7489     7474      -15     
Files Changed Coverage Δ
src/tss2-fapi/ifapi_json_deserialize.c 81.98% <ø> (ø)
src/tss2-fapi/ifapi_helpers.c 84.97% <92.72%> (-0.71%) ⬇️
src/tss2-fapi/ifapi_eventlog_system.c 76.62% <92.85%> (+1.92%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this pull request Nov 9, 2023
Based on tpm2-software#2685 In the function spi_tpm_helper_read_sts_reg the result
is converted back to the correct endianess.
Addresses tpm2-software#2531

Signed-off-by: Juergen Repp <juergen_repp@web.de>
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this pull request Nov 28, 2023
Based on tpm2-software#2685 In the function spi_tpm_helper_read_sts_reg the result
is converted back to the correct endianess.
Addresses tpm2-software#2531

Co-authored-by: Lukas Märdian <slyon@ubuntu.com>
Signed-off-by: Juergen Repp <juergen_repp@web.de>
@AndreasFuchsTPM AndreasFuchsTPM merged commit 027926b into tpm2-software:master Nov 30, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix FAPI event logging.
2 participants