IP Library Granted Patent US 10,884,830
Granted Patent B1
US 10,884,830 · App. 16/944,866 · Granted Jan 5, 2021

Method and apparatus for multithreaded data transmission in a tee system

Inventors: Qi Liu (Hangzhou, CN); Boran Zhao (Hangzhou, CN); Ying Yan (Hangzhou, CN); Changzheng Wei (Hangzhou, CN)
Assignee: Advanced New Technologies Co., Ltd.
G06F9/544G06F9/52G06F12/0223G06F21/606G06F2212/1052
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,884,830
App. No.
16/944,866
Granted
Jan 5, 2021
Kind
B1
Abstract

A computer-implemented method, non-transitory, computer-readable medium, and computer-implemented system are provided for data transmission in a trusted execution environment (TEE) system. The method executed by a first thread in multiple threads on a TEE side includes: obtaining first data; obtaining a TEE side thread lock; obtaining a write offset address and a read offset address respectively by reading a first address and a second address; determining whether a quantity of bytes of the first data to be transmitted is less than or equal to a quantity of writable bytes; if the quantity of bytes of the first data is less than or equal to the quantity of writable bytes, writing the first data into third addresses starting from the write offset address; updating the write offset address in the first address; and releasing the TEE side thread lock.

Claims (43)

1. A computer-implemented method for data transmission in a trusted execution environment (TEE) system, wherein:

the TEE system comprises a TEE side and a non-TEE side,

the non-TEE side comprises a shared memory, the shared memory comprises a first address, a second address, and a plurality of consecutive third addresses, wherein the first address stores a write offset address, the write offset address indicates a writeable start address in the plurality of consecutive third addresses, the second address stores a read offset address, the read offset address indicates a readable start address in the plurality of consecutive third addresses, the plurality of consecutive third addresses store data from the TEE side,

the non-TEE side is preconfigured with a non-TEE side thread lock corresponding to the shared memory, and

the computer-implemented method is executed by a thread on the non-TEE side, comprising:

obtaining the non-TEE side thread lock;

obtaining the write offset address and the read offset address respectively by reading the first address and the second address;

reading unread bytes in written data in the plurality of consecutive third addresses as second data, wherein the unread bytes are determined based on the write offset address and the read offset address, and each address corresponds to one byte;

updating the read offset address in the second address; and

releasing the non-TEE side thread lock.

2. The computer-implemented method according to claim 1 , wherein the write offset address is after the read offset address, and the unread bytes comprise bytes in the read offset address to a previous address of the write offset address.

3. The computer-implemented method according to claim 1 , wherein the write offset address is before the read offset address, the unread bytes are bytes in the plurality of consecutive third addresses other than read bytes, and the read bytes comprise bytes in the write offset address to a previous address of the read offset address.

4. The computer-implemented method according to claim 1 , wherein when the write offset address is the same as the read offset address, the plurality of consecutive third addresses do not comprise any unread byte.

5. The computer-implemented method according to claim 1 , wherein the second data comprise log data, and the method further comprises: after releasing the non-TEE side thread lock, sending the second data to a log printing program on the non-TEE side for printing the second data.

6. A non-transitory, computer-readable medium storing one or more instructions executable by one or more processors serving for a thread in a plurality of threads on a non-trusted execution environment (TEE) side in a TEE system, wherein:

the TEE system comprises a TEE side and the non-TEE side,

the non-TEE side comprises a shared memory, the shared memory comprises a first address, a second address, and a plurality of consecutive third addresses, wherein the first address stores a write offset address, the write offset address indicates a writeable start address in the plurality of consecutive third addresses, the second address stores a read offset address, the read offset address indicates a readable start address in the plurality of consecutive third addresses, the plurality of consecutive third addresses store data from the TEE side,

the non-TEE side is preconfigured with a non-TEE side thread lock corresponding to the shared memory,

the non-TEE side comprises the one or more processors, and

the one or more instructions, when executed by the one or more processors, perform one or more operations comprising:

obtaining the non-TEE side thread lock;

obtaining the write offset address and the read offset address respectively by reading the first address and the second address;

reading unread bytes in written data in the plurality of consecutive third addresses as second data, wherein the unread bytes are determined based on the write offset address and the read offset address, and each address corresponds to one byte;

updating the read offset address in the second address; and

releasing the non-TEE side thread lock.

7. The non-transitory, computer-readable medium according to claim 6 , wherein the write offset address is after the read offset address, and the unread bytes comprise bytes in the read offset address to a previous address of the write offset address.

8. The non-transitory, computer-readable medium according to claim 6 , wherein the write offset address is before the read offset address, the unread bytes are bytes in the plurality of consecutive third addresses other than read bytes, and the read bytes comprise bytes in the write offset address to a previous address of the read offset address.

9. The non-transitory, computer-readable medium according to claim 6 , wherein when the write offset address is the same as the read offset address, the plurality of consecutive third addresses do not comprise any unread byte.

10. The non-transitory, computer-readable medium according to claim 6 , wherein the second data comprise log data, and the operations further comprise: after releasing the non-TEE side thread lock, sending the second data to a log printing program on the non-TEE side for printing the second data.

11. A computer-implemented system for data transmission in a trusted execution environment (TEE) system, wherein:

the TEE system comprises a TEE side and a non-TEE side,

the non-TEE side comprises a shared memory, the shared memory comprises a first address, a second address, and a plurality of consecutive third addresses, wherein the first address stores a write offset address, the write offset address indicates a writeable start address in the plurality of consecutive third addresses, the second address stores a read offset address, the read offset address indicates a readable start address in the plurality of consecutive third addresses, the plurality of consecutive third addresses store data from the TEE side,

the non-TEE side is preconfigured with a non-TEE side thread lock corresponding to the shared memory,

the non-TEE side comprises one or more processors serving for a thread on the non-TEE side, and one or more computer memory devices interoperably coupled with the one or more processors and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more processors, perform one or more operations comprising:

obtaining the non-TEE side thread lock;

obtaining the write offset address and the read offset address respectively by reading the first address and the second address;

reading unread bytes in written data in the plurality of consecutive third addresses as second data, wherein the unread bytes are determined based on the write offset address and the read offset address, and each address corresponds to one byte;

updating the read offset address in the second address; and

releasing the non-TEE side thread lock.

12. The computer-implemented system according to claim 11 , wherein the write offset address is after the read offset address, and the unread bytes comprise bytes in the read offset address to a previous address of the write offset address.

13. The computer-implemented system according to claim 11 , wherein the write offset address is before the read offset address, the unread bytes are bytes in the plurality of consecutive third addresses other than read bytes, and the read bytes comprise bytes in the write offset address to a previous address of the read offset address.

14. The computer-implemented system according to claim 11 , wherein when the write offset address is the same as the read offset address, the plurality of consecutive third addresses do not comprise any unread byte.

15. The computer-implemented system according to claim 11 , wherein the second data comprise log data, and the operations further comprise: after releasing the non-TEE side thread lock, sending the second data to a log printing program on the non-TEE side for printing the second data.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 18, 2025
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ANTCHAIN TECHNOLOGY PTE. LTD.
Reel/Frame 070253/0064 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053754/0625 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: LIU, QI; ZHAO, BORAN; YAN, YING; WEI, CHANGZHENG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 053643/0606 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053743/0464 →