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: Fix error handling in state machines 3.2.x #2754

Conversation

JuergenReppSIT
Copy link
Member

@JuergenReppSIT JuergenReppSIT commented Jan 19, 2024

  • In some sub state machines, which had no async function, the state was not reset to the initial state in error cases.
  • In some FAPI commands in the async part it was not checked whether the command is state is equal _FAPI_STATE_INIT.
  • In several FAPI commands the current state of the FAPI context was not reset to _FAPI_STATE_INIT in error cases.
    Thus it was possible that a sequence error did occur after a normal error case.

* In some sub state machines, which had no async function, the
  state was not reset to the initial state in error cases.
* In some FAPI commands in the async part it was not checked
  whether the command is state is equal _FAPI_STATE_INIT.
* In several FAPI commands the current state of the FAPI
  context was not reset to _FAPI_STATE_INIT in error cases.
  Thus it was possible that a sequence error did occur after
  a normal error case.

Signed-off-by: Juergen Repp <[email protected]>
@JuergenReppSIT JuergenReppSIT force-pushed the fapi-fix-sub-state-machines-3.2.x branch from 221f29d to a378905 Compare January 21, 2024 12:37
@JuergenReppSIT JuergenReppSIT changed the title FAPI: Fix error checking of state machines 3.2.x FAPI: Fix error handling in state machines 3.2.x Jan 21, 2024
Copy link

codecov bot commented Jan 21, 2024

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (fb92f8d) 83.64% compared to head (a378905) 83.59%.
Report is 1 commits behind head on 3.2.x.

Files Patch % Lines
src/tss2-fapi/fapi_util.c 65.00% 7 Missing ⚠️
src/tss2-fapi/api/Fapi_GetTpmBlobs.c 33.33% 2 Missing ⚠️
src/tss2-fapi/api/Fapi_Provision.c 50.00% 2 Missing ⚠️
src/tss2-fapi/api/Fapi_Decrypt.c 0.00% 1 Missing ⚠️
src/tss2-fapi/api/Fapi_Delete.c 83.33% 1 Missing ⚠️
src/tss2-fapi/api/Fapi_GetCertificate.c 50.00% 1 Missing ⚠️
src/tss2-fapi/api/Fapi_GetDescription.c 50.00% 1 Missing ⚠️
src/tss2-fapi/api/Fapi_GetEsysBlob.c 0.00% 1 Missing ⚠️
src/tss2-fapi/api/Fapi_GetRandom.c 0.00% 1 Missing ⚠️
src/tss2-fapi/api/Fapi_Import.c 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##            3.2.x    #2754      +/-   ##
==========================================
- Coverage   83.64%   83.59%   -0.06%     
==========================================
  Files         349      349              
  Lines       38693    38721      +28     
==========================================
+ Hits        32366    32369       +3     
- Misses       6327     6352      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AndreasFuchsTPM AndreasFuchsTPM merged commit 77d254e into tpm2-software:3.2.x Jan 24, 2024
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.

2 participants