Skip to content

Conversation

@qc-azarrabi
Copy link
Contributor

All commit to prepare for memory object, including:

  • extending ns code to handle typed objects including changes to synchronization as ns table users extended to local users.
  • differentiate between local id and id seen by QTEE.
  • clean up and bugfixes.

Move some shared symbols from qcomte_object.c.
Move tee_call_t refernce to the root object to keep life easier.

Signed-off-by: Amirreza Zarrabi <[email protected]>
Update based on commit 9c20f36.

Signed-off-by: Amirreza Zarrabi <[email protected]>
Rename some symbols for consistency.

Signed-off-by: Amirreza Zarrabi <[email protected]>
The return values was not handelled.
Also, some cleanups for namespace codes.

Signed-off-by: Amirreza Zarrabi <[email protected]>
Signed-off-by: Amirreza Zarrabi <[email protected]>
@qc-azarrabi qc-azarrabi force-pushed the mem-object branch 6 times, most recently from 562e578 to bf549f7 Compare March 17, 2025 22:18
set(SRC
src/qcomtee_object.c
src/objects/credentials_obj.c
src/objects/mem_obj.c
Copy link
Contributor

Choose a reason for hiding this comment

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

Indent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack.

#include <qcomtee_object_private.h>

/* MEMORY Object. */
struct qcomtee_memmory {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo? qcomtee_memory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack.

#include <qcomtee_object_private.h>

/* MEMORY Object. */
/* Which TEE API was used to prepare the meory object: */
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo, 'memory object'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack.


/* Simple id allocator. */
for (i = 0; i < TABLE_SIZE; i++) {
if (idx == 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Comparing possibly uninitialized idx here is giving a compilation error..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack.

@qc-azarrabi qc-azarrabi force-pushed the mem-object branch 4 times, most recently from 58c3722 to 3d78ec3 Compare March 21, 2025 05:07
Copy link
Contributor

@harshaldev27 harshaldev27 left a comment

Choose a reason for hiding this comment

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

This commit looks good to me.

Copy link
Contributor

@harshaldev27 harshaldev27 left a comment

Choose a reason for hiding this comment

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

This commit looks good to me.

Copy link
Contributor

@harshaldev27 harshaldev27 left a comment

Choose a reason for hiding this comment

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

This looks good to me.

Copy link
Contributor

@harshaldev27 harshaldev27 left a comment

Choose a reason for hiding this comment

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

This commit looks good to me.

Copy link
Contributor

@harshaldev27 harshaldev27 left a comment

Choose a reason for hiding this comment

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

This commit looks good to me.

 - Add new object ID. This is the ID seen by QTEE. The original
   object_id is the ID visibale locally.
 - Improve ns table to accept type to search for tee_object_id.

Signed-off-by: Amirreza Zarrabi <[email protected]>
Introduce these APIs:
  - qcomtee_memory_object_alloc to create a new memory object.
  - qcomtee_memory_object_addr to get address of memory object.
  - qcomtee_memory_object_size to get size of memory object.
  - qcomtee_memory_object_release to release the meory object.

Signed-off-by: Amirreza Zarrabi <[email protected]>
Signed-off-by: Amirreza Zarrabi <[email protected]>
Run unittest path_to_bin 0 cmd [use buffer]
Run unittest path_to_bin 1 cmd [use memory object]

Signed-off-by: Amirreza Zarrabi <[email protected]>
@harshaldev27 harshaldev27 merged commit 457c806 into quic:main Mar 26, 2025
2 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.

2 participants