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

Tee client api errata #362

Merged
merged 3 commits into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions libteec/include/tee_client_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ extern "C" {
* TEEC_MEMREF_WHOLE The Parameter is a Registered Memory Reference
* that refers to the entirety of its parent Shared
* Memory block. The parameter structure is a
* TEEC_MemoryReference. In this structure, the
* Implementation MUST read only the parent field
* and MAY update the size field when the operation
* completes.
* TEEC_RegisteredMemoryReference. In this
* structure, the Implementation MUST read only the
* parent field and MAY update the size field when
* the operation completes.
*
* TEEC_MEMREF_PARTIAL_INPUT A Registered Memory Reference structure that
* refers to a partial region of its parent Shared
Expand Down Expand Up @@ -157,8 +157,21 @@ extern "C" {
* TEEC_ERROR_SECURITY A security fault was detected.
* TEEC_ERROR_SHORT_BUFFER The supplied buffer is too short for the
* generated output.
* TEEC_ERROR_TARGET_DEAD Trusted Application has panicked
* during the operation.
* TEE_ERROR_EXTERNAL_CANCEL Defined by the Trusted User Interface
* specification: An external event has caused a
* User Interface operation to be aborted.
* TEEC_ERROR_EXTERNAL_CANCEL Deprecated: not specified in client API, use
* TEE_ERROR_EXTERNAL_CANCEL intead.
* TEE_ERROR_OVERFLOW Internal TEE error – documented for completeness
* TEE_ERROR_TARGET_DEAD The Trusted Application has terminated.
* TEEC_ERROR_TARGET_DEAD The Trusted Application has terminated.
* TEE_ERROR_STORAGE_NO_SPACE Internal TEE error – documented for completeness
* TEEC_ERROR_STORAGE_NO_SPACE Deprecated: not specified in client API, use
* TEE_ERROR_STORAGE_NO_SPACE instead.
* TEE_ERROR_MAC_INVALID Internal TEE error – documented for completeness
* TEE_ERROR_SIGNATURE_INVALID Internal TEE error – documented for completeness
* TEE_ERROR_TIME_NOT_SET Internal TEE error – documented for completeness
* TEE_ERROR_TIME_NEEDS_RESET Internal TEE error – documented for completeness
*/

/**
Expand All @@ -183,9 +196,17 @@ extern "C" {
#define TEEC_ERROR_COMMUNICATION 0xFFFF000E
#define TEEC_ERROR_SECURITY 0xFFFF000F
#define TEEC_ERROR_SHORT_BUFFER 0xFFFF0010
#define TEE_ERROR_EXTERNAL_CANCEL 0xFFFF0011
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this line right above line 197.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference would have been to keep the order the same as it appears in Global Platform specification. But I do not want to argue on that. I applied your suggestion in cb92e7f.

#define TEEC_ERROR_EXTERNAL_CANCEL 0xFFFF0011
#define TEE_ERROR_OVERFLOW 0xFFFF300F
#define TEE_ERROR_TARGET_DEAD 0xFFFF3024
#define TEEC_ERROR_TARGET_DEAD 0xFFFF3024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move TEE_ERROR_TARGET_DEAD definition right above line 198 and remove below line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting the duplicate. Fixed in cb92e7f.

#define TEE_ERROR_STORAGE_NO_SPACE 0xFFFF3041
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer TEE_ERROR_STORAGE_NO_SPACE definition right above TEEC_ERROR_STORAGE_NO_SPACE definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. I applied the suggestion in cb92e7f.

#define TEEC_ERROR_STORAGE_NO_SPACE 0xFFFF3041
#define TEE_ERROR_MAC_INVALID 0xFFFF3071
#define TEE_ERROR_SIGNATURE_INVALID 0xFFFF3072
#define TEE_ERROR_TIME_NOT_SET 0xFFFF5000
#define TEE_ERROR_TIME_NEEDS_RESET 0xFFFF5001

/**
* Function error origins, of type TEEC_ErrorOrigin. These indicate where in
Expand Down