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

reset tcti_common->state in tcti_device_receive when return TSS2_TCTI… #2929

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xcfxr
Copy link

@xcfxr xcfxr commented Dec 19, 2024

when IO device has something wrong, It needs to reset tcti_common->state to TCTI_STATE_TRANSMIT. Or when another message was sent to tcti_device(E.g. tpm2_getcap) it will fail in tcti_common_transmit_checks.
the tpm2-tss version is 3.1.0 and the tpm2-abrmd version is 2.6.1

Here is the Error log:(It looks like read failure leads to this bug. Then other command fails(E.g. tpm2_getcap)).
tpm2-abrmd[15049]: ERROR:tcti:src/tss2-tcti/tcti-device.c:262:tcti_device_receive() Failed to read response from fd 5, got errno 62: Timer expired
tpm2-abrmd[15049]: [src/tcti.c:152] Tss2_Tcti_Receive failed: tcti:IO failure (RC: 0xa000a)
tpm2-abrmd[15049]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
tpm2-abrmd[15049]: save_session: TCTI failed while saving session context from SessionEntry, got RC 0xa000a
tpm2-abrmd[15049]: [src/tcti.c:134] Tss2_Tcti_Transmit failed: tcti:Function called in the wrong order (RC: 0xa0007)
tpm2-abrmd[15049]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
tpm2-abrmd[15049]: save_session: TCTI failed while saving session context from SessionEntry, got RC 0xa0007
tpm2-abrmd[15049]: save_session_callback: failed to save SessionEntry, flushing
tpm2-abrmd[15049]: [src/tpm2.c:577] Tss2_Sys_FlushContext failed: tcti:Function called in the wrong order (RC: 0xa0007)
tpm2-abrmd[15049]: flush_session: failed to flush session context with handle 0x3000000: 0xa0007
tpm2-abrmd[15049]: [src/tpm2.c:529] Tss2_Sys_ContextLoad failed: tcti:Function called in the wrong order (RC: 0xa0007)
tpm2-abrmd[15049]: Failed to load context: 0xa0007
tpm2-abrmd[15049]: [src/tcti.c:134] Tss2_Tcti_Transmit failed: tcti:Function called in the wrong order (RC: 0xa0007)
tpm2-abrmd[15049]: [src/tcti.c:134] Tss2_Tcti_Transmit failed: tcti:Function called in the wrong order (RC: 0xa0007)

…_RC_IO_ERROR

Signed-off-by: xcfxr <xucee@qq.com>
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.

1 participant