Data processing method and device and computer readable storage medium
By dividing the hardware resources of the computing device into two sides of REE and TEE, and running containers on the TEE side to process data, the problem of isolation damage of containers after the operating system kernel is compromised, achieving high security of containers and user data Protect.
Patent Information
- Application Number
- CN202310705849.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-06-14
AI Technical Summary
After the operating system kernel is compromised, the isolation between containers is damaged, resulting in the user data security being threatened. How to improve the security of containers to prevent data theft.
By dividing the hardware resources of the computing device into two sides of the Rich Execution Environment (REE) and Trusted Execution Environment (TEE), the processor acquires the pending data on the REE side and runs the container on the TEE side for processing, leveraging the hardware security characteristics of TEE Prevent the REE side host operating system kernel from accessing the TEE side container and store the decryption key on the TEE side to protect the encrypted data, ensuring that only the secure container handles user data.
It effectively reduces the risk of containers being attacked, improves the security of containers and user data, and prevents attackers from being unable to manipulate TEE containers and steal data even if they break through the REE side host operating system kernel.
Smart Images

Figure CN119149163A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtualization technology, and in particular to a data processing method, device and computer-readable storage medium. Background Art
[0002] Container is a lightweight virtualization technology that uses the namespace and process group management (cgroup) technology supported by the Linux kernel to isolate applications (APP) and their dependent packages (bins / libs of the operating environment, specifically all the files required to run the APP) in an independent operating environment. Figure 1 As shown, Figure 1 This is a schematic diagram of the architecture of a computing device (such as a server) that runs containers. The infrastructure can be the hardware of the computing device. The host operating system uses the Linux kernel, where the namespace technology is used to achieve isolation between containers and the cgroup technology is used to achieve the allocation of container resources. The resources are specifically the virtual processor (virtualised central processing unit, VCPU) and memory allocated to the container. The container engine (also known as the container runtime) is similar to the virtual machine monitor (VMM), which runs in the host operating system and is used to manage containers. Compared with the characteristics of the virtual machine (VM) that comes with its own operating system, the container does not have an operating system. The container runs as a process in the host operating system, so the startup speed of the container is faster than that of the virtual machine, which is particularly suitable for lightweight applications, and a host can run thousands of containers (processes) at the same time.
[0003] However, the container runs as a process in the host operating system, and different containers share the same operating system kernel. Once the operating system kernel is compromised, the isolation between containers will be destroyed. In other words, once the attacker compromises the operating system kernel, he will be able to control all containers running on the operating system kernel.
[0004] Therefore, how to ensure the security of containers in computing devices and prevent attackers from stealing user data in containers (including user data stored in containers and being used by containers) has become a major problem facing this field. Summary of the invention
[0005] The present application provides a data processing method, device, and computer-readable storage medium, which can reduce the risk of a container being attacked by an attacker, improve the security of the container, and thus improve the security of user data in the container.
[0006] In a first aspect, a data processing method is provided, which is applied to a computing device, wherein the hardware resources of the computing device are divided into a rich execution environment (REE) side and a trusted execution environment (TEE) side, and the TEE side includes one or more containers. The method includes the following steps: a processor obtains data to be processed on the REE side, and then runs a first container on the TEE side to process the data to be processed, and the first container is any one of the one or more containers included on the TEE side.
[0007] In the above scheme, since the container is located on the TEE side of the computing device, when the processor of the computing device runs the host operating system kernel on the REE side, the hardware security features of the TEE protect the container on the TEE side from being accessed by the host operating system kernel on the REE side. Therefore, even if the attacker breaks into the host operating system kernel on the REE side, he cannot manipulate the container running on the TEE side, thereby protecting the security of the container in the computing device and further protecting the security of the user data in the container.
[0008] In a possible implementation, the TEE side includes one or more VMs, and each of the one or more VMs includes at least one container of the one or more containers.
[0009] In this implementation, since different VMs on the TEE side include different containers, even if an attacker breaks into a container in a VM, he can only manipulate the container running in the VM and cannot manipulate the container running in another VM. Therefore, it can further protect the security of containers in computing devices and improve the security of user data.
[0010] In a possible implementation, the data to be processed obtained by the processor on the REE side is encrypted data. Before the processor runs the first container on the TEE side to process the data to be processed, the processor obtains the decryption key for decrypting the encrypted data stored on the TEE side, and then uses the decryption key to decrypt the encrypted data to obtain the data to be processed.
[0011] In this implementation, since the data to be processed is encrypted on the REE side and the decryption key is stored on the TEE side, the host operating system kernel and software (such as virtual machine manager, ordinary VM, etc.) on the REE side cannot obtain the decryption key stored on the TEE side. Therefore, even if the attacker breaks into the host operating system kernel and software on the REE side and steals the encrypted data, he cannot decrypt the plaintext of the data to be processed. This can meet the requirement that user data is not stolen by the host operating system kernel and software on the REE side, further improving user data security.
[0012] In a possible implementation, the processor runs the first container on the TEE side when determining that the first container is a secure container.
[0013] Specifically, the processor can provide the configuration information of the first container (such as the type of virtual processor core, the number of virtual processor cores, memory address, etc.), the name of the APP installed on the first container, and the hash value of the image of the first container, etc., to the user on the REE side for security measurement, that is, the user determines whether the first container is a secure container that meets his expectations or an unsecure container with security threats. If the processor obtains feedback from the user that the first container is a secure container that meets his expectations, the processor determines that the first container is a secure container and runs the first container to process user data. Otherwise, the processor determines that the first container is an unsecure container and does not run the first container to process user data.
[0014] By implementing this implementation method, the processor runs the container to process user data only when it is determined that the container is secure, which can avoid using an insecure container to process user data. This can not only improve the security of the container, but also improve the security of the user data in the container.
[0015] In a possible implementation, the processor runs the first container on the TEE side when determining that the computing device is a secure device.
[0016] Specifically, the processor can provide the certificate of the computing device to the user on the REE side for a legitimacy check, that is, the user determines whether the computing device is a secure device that meets his or her expectations, or a non-secure device that poses a security threat. In the case where the processor obtains feedback from the user that the computing device is a secure device that meets his or her expectations, the processor determines that the computing device is a secure device and runs the first container to process user data; otherwise, the processor determines that the computing device is a non-secure device and does not run the first container to process user data.
[0017] By implementing this implementation method, the processor runs the container to process user data only when it determines that the computing device is secure. This can avoid using an unsafe computing device to run the container to process user data, which can not only improve the security of the container, but also improve the security of the user data in the container.
[0018] In a possible implementation, before the processor obtains the data to be processed on the REE side, it can create the first container in the following manner: the processor obtains the configuration information of one or more VMs to be created on the REE side, and creates one or more VMs on the TEE side according to the configuration information, and then the processor obtains the image of the first container on the REE side, and obtains the identifier of the first VM used to create the first container on the REE side, and then the processor creates the first container in the first VM on the TEE side according to the identifier of the first VM and according to the image of the first container, and the first VM belongs to the above one or more VMs.
[0019] Through the above implementation method, a VM is created on the TEE side, and a container is created in the VM on the TEE side, so that container isolation at the VM level can be achieved.
[0020] In a possible implementation, the method provided by the first aspect or any possible implementation of the first aspect further includes the following steps: the processor obtains a first management command for the life cycle of the first container on the REE side, and the processor performs one or any combination of the following operations on the first container according to the first management command on the TEE side: starting the first container, stopping the first container, removing the first container, migrating the first container, viewing the image of the first container, and removing the image of the first container.
[0021] This implementation method can manage the life cycle of the container on the TEE side.
[0022] In one possible implementation, the method provided by the first aspect or any possible implementation of the first aspect further includes the following steps: the processor obtains a second management command for the first container on the REE side, and the processor performs one or any combination of the following operations on the first container according to the second management command on the TEE side: installing an application, starting an application, shutting down an application, upgrading an application, uninstalling an application, and migrating an application.
[0023] This implementation method can manage applications in the container on the TEE side.
[0024] In a possible implementation, a container runtime and a first virtual machine manager are deployed on the REE side, a second virtual machine manager is deployed on the TEE side, a container proxy module is deployed in the VM to which the first container belongs, and the operations performed by the processor on the REE side are collaboratively executed by the processor running the container runtime and the first virtual machine manager, and the operations performed by the processor on the TEE side are collaboratively executed by the processor running the second virtual machine manager and the container proxy module.
[0025] In a possible implementation manner, the VM to which the first container belongs includes a virtualized input / output (VirtIO) front-end driver, the first virtual machine manager includes a VirtIO back-end driver, and the method provided by the first aspect or any possible implementation manner of the first aspect further includes the following step: the processor runs the VirtIO front-end driver and the VirtIO back-end driver to collaboratively simulate to obtain a virtualized I / O device for use by the first container.
[0026] This implementation can enable the first container to perform I / O communication through the virtualized I / O device.
[0027] In a possible implementation, the TEE side includes a first memory for data transmission between a VirtIO front-end driver and a VirtIO back-end driver, the REE side includes a second memory, a memory synchronization module is deployed in the second virtual machine manager, the memory synchronization module includes a mapping relationship between the first memory and the second memory, and the method provided by the first aspect or any possible implementation of the first aspect further includes the following steps: the processor runs the memory synchronization module to synchronize first data in the first memory to the second memory according to the mapping relationship between the first memory and the second memory, wherein the first data is data that the VirtIO front-end driver needs to send to the VirtIO back-end driver, or the processor runs the memory synchronization module to synchronize second data in the second memory to the first memory according to the mapping relationship between the first memory and the second memory, wherein the second data is data from the VirtIO back-end driver that the VirtIO front-end driver needs to receive.
[0028] This implementation method can implement the read / write operation of the first container on the VirtIO backend driver, thereby meeting the read / write requirements of the first container.
[0029] In a second aspect, a data processing apparatus is provided, which can be applied to a computing device, wherein hardware resources of the computing device are divided into a REE side and a TEE side, wherein the TEE side includes one or more containers, and the apparatus includes:
[0030] An acquisition module, used to acquire the data to be processed on the REE side;
[0031] The processing module is used to run a first container on the TEE side to process the data to be processed, where the first container is any one of the one or more containers included on the TEE side.
[0032] In a possible implementation, the TEE side includes one or more VMs, and each of the one or more VMs includes at least one container of the one or more containers.
[0033] In a possible implementation, the data to be processed acquired by the acquisition module on the REE side is encrypted data. Before the processing module runs the first container on the TEE side to process the data to be processed, the processing module is also used to obtain the decryption key stored on the TEE side on the TEE side, and then use the decryption key to decrypt the encrypted data to obtain the data to be processed.
[0034] In a possible implementation, the processing module is specifically configured to: when it is determined that the first container is a secure container, run the first container on the TEE side.
[0035] In a possible implementation, the processing module is specifically configured to: when it is determined that the computing device is a secure device, run the first container on the TEE side.
[0036] In one possible implementation, the acquisition module is also used to acquire configuration information of one or more VMs to be created on the REE side, the processing module is also used to create one or more VMs on the TEE side according to the configuration information, the acquisition module is also used to acquire an image of the first container on the REE side, and acquire an identifier of the first VM used to create the first container on the REE side, and then, the processing module is also used to create a first container in the first VM according to the identifier of the first VM and according to the image of the first container on the TEE side, and the first VM belongs to the above-mentioned one or more VMs.
[0037] In one possible implementation, the acquisition module is used to acquire a first management command for the life cycle of the first container on the REE side, and the processing module is used to perform one or any combination of the following operations on the first container according to the first management command on the TEE side: start the first container, stop the first container, remove the first container, migrate the first container, view the image of the first container, and remove the image of the first container.
[0038] In one possible implementation, the acquisition module is used to acquire the second management command for the first container on the REE side, and the processing module is used to perform one or any combination of the following operations on the first container according to the second management command on the TEE side: install, start, shut down, upgrade, uninstall and migrate APP.
[0039] In one possible implementation, a container runtime and a first virtual machine manager are deployed on the REE side, a second virtual machine manager is deployed on the TEE side, a container proxy module is deployed in the VM to which the first container belongs, and operations performed by the processor on the REE side are collaboratively executed by the processor running the container runtime and the first virtual machine manager, and operations performed by the processor on the TEE side are collaboratively executed by the processor running the second virtual machine manager and the container proxy module.
[0040] In a possible embodiment, the processing module is further configured to simulate and obtain a virtualized I / O device for use by the first container.
[0041] In a possible implementation, the processing module is further used to synchronize first data in the first memory to the second memory according to the mapping relationship between the first memory and the second memory, the first data being data that the VirtIO front-end driver needs to send to the VirtIO back-end driver, or to synchronize second data in the second memory to the first memory according to the mapping relationship between the first memory and the second memory, the second data being data from the VirtIO back-end driver that the VirtIO front-end driver needs to receive. The first memory is a memory included on the TEE side for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, the second memory is a memory on the REE side, the VirtIO front-end driver is deployed in the virtual machine to which the first container belongs, and the VirtIO back-end driver is deployed in the first virtual machine manager on the REE side.
[0042] For the relevant beneficial effects and descriptions of the data processing device provided by the second aspect and any implementation method of the second aspect, please refer to the relevant beneficial effects and descriptions of the aforementioned first aspect and any implementation method of the first aspect, and will not be repeated here.
[0043] According to a third aspect, a computing device is provided, comprising a processor and a memory; the processor is used to execute instructions stored in the memory, so that the computing device implements the method provided in the first aspect or any possible implementation of the first aspect.
[0044] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions for implementing the method provided in the first aspect or any possible implementation of the first aspect.
[0045] According to a fifth aspect, a computer program product is provided, comprising a computer program. When the computer program is read and executed by a computing device, the computing device executes the method provided in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of the architecture of a computing device for running a container provided in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of the hardware architecture of an ARM processor provided in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0049] Figure 4A flowchart of a data processing method provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of the structure of another computing device provided in an embodiment of the present application;
[0051] Figure 6 A schematic diagram of a process of starting a trusted container by a computing device provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of the structure of another computing device provided in an embodiment of the present application;
[0053] Figure 8 A schematic diagram of a process for implementing I / O communication of a trusted container by a computing device provided in an embodiment of the present application;
[0054] Fig. 9 A schematic diagram of the structure of a data processing device exemplarily shown in an embodiment of the present application;
[0055] Fig.10 A schematic diagram of the structure of another computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The technical solution provided by this application will be described below in conjunction with the accompanying drawings.
[0057] In order to make the technical solution provided by this application clearer, the relevant terms are first explained.
[0058] (1) I / O devices refer to hardware that can transmit data with computing devices. The most common I / O devices include keyboards, mice, block devices (such as disks), and network devices (such as network cards, modems, etc.).
[0059] (2) VirtIO can be understood as a set of general I / O device virtualization programs. Specifically, VirtIO includes a front-end driver program and a back-end driver program. The front-end driver program and the back-end driver program can work together to simulate a series of virtualized I / O devices, such as VirtIO-BLK and VirtIO-NET. Among them, VirtIO-BLK is a virtualized storage device. In fact, VirtIO-BLK is a virtualization program for creating a disk (a disk is an I / O device). Through VirtIO-BLK, a virtualized disk can be created; VirtIO-NET is a virtualized network device. Similarly, VirtIO-NET is a virtualization program for creating a network device. Through VirtIO-NET, a virtualized network device (such as a virtualized network interface controller (VNIC)) can be created.
[0060] (3) Ordinary VM refers to the VM included in the REE side.
[0061] (4) Trusted VM refers to the VM included on the TEE side, which can also be called confidential VM.
[0062] (5) Ordinary container refers to the container included on the REE side.
[0063] (6) Trusted container refers to the container included on the TEE side, which can also be called a confidential container.
[0064] (7) Container runtime, also known as container engine, is a program that creates and runs containers based on the obtained container images, such as container orchestration engine (Kubernetes, abbreviated as k8s), container daemon (containerd), application container engine (docker), etc. Container runtime can manage the life cycle of containers (including creating / starting / stopping / removing containers) and the life cycle of container images (including pulling / viewing / removing container images).
[0065] (8) A container image is a special file system that, in addition to providing the programs, libraries, resources, configuration files, etc. required for the container runtime, also contains some configuration parameters prepared for runtime (such as anonymous volumes, environment variables, users, etc.). The relationship between a container image and a container is like the relationship between a class and an instance in object-oriented programming. A container image is a static definition, and a container is an entity of a container image at runtime.
[0066] like Figure 1As shown, the container runs as a process in the host operating system, and different containers share the same operating system kernel. Once the operating system kernel is compromised, the isolation between containers will be destroyed. In other words, once the attacker compromises the operating system kernel, he will be able to manipulate all containers running on the operating system kernel and steal user data in the containers.
[0067] Therefore, how to ensure the security of containers in computing devices and prevent attackers from stealing user data in containers has become an urgent problem to be solved in this field.
[0068] In order to solve the above problems, the present application provides a computing device and a data processing method. In order to facilitate understanding of the computing device and the data processing method provided by the present application, the TrustZone technology involved in the present application is first introduced below.
[0069] As the performance of advanced RISC machines (ARM) processors continues to improve, computing devices running ARM processors (such as servers and smart terminal devices) have brought great convenience to people's lives. At the same time, computing devices also carry more and more user data, and users are paying more and more attention to the security of computing devices. On ARM processors, the current mainstream system-level solution is TrustZone technology.
[0070] TrustZone technology was first introduced in the ARMv6 version as a security extension. It divides the hardware resources of computing devices into two worlds, the REE side (also called the normal world) and the TEE side (also called the secure world). As a hardware security feature, TrustZone works on the TEE side.
[0071] The REE side does not mean that the operating system (OS) or software running in it is malicious, but that the security of the environment it is in is lower than that of the TEE side. Because when the processor works on the REE side, the resources on the TEE side (such as registers, memory, cache, peripherals, etc.) are prohibited from access. Once the processor tries to access these resources, the system will crash directly. For example, TrustZone can set sensitive memory as secure memory by configuring the trustzoneaddress space contoller (TZASC) register and the trustzone memory adapter (TZMA) register, so that the REE side cannot access this memory. When the processor works on the TEE side, it can access resources on both the TEE side and the REE side. It is precisely because the TEE side has higher permissions than the operating system on the REE side that TrustZone can provide a higher level of security protection for the operating system on the REE side as a trusted root.
[0072] Taking ARMv8.4 as an example, Figure 2 The hardware architecture of ARM is described. The left side is the architecture of the REE side, and the right side is the architecture of the TEE side. The REE side includes four working permission layers: exception level 0 (EL0), EL1, EL2, and EL3. The TEE side also includes four layers: secure exception level 0 (SEL0), SEL1, SEL2, and EL3. Among them, the EL0 layer can also be called the user state layer, the EL1 layer can also be called the kernel state layer, the EL2 layer can also be called the virtualization monitoring (hypervisor) layer, and the EL3 layer can also be called the monitoring layer. The higher the level, the higher the level authority, and the smaller the level, the lower the level authority.
[0073] The operating system that is closely connected to the user runs at the EL0 layer on the REE side, such as the operating system of the virtual machine. The host operating system runs at the EL1 layer. The virtual machine manager runs at the EL2 layer. The ARM trusted firmware runs at the EL3 layer. The ARM trusted firmware (ATF) is the first component that runs when the processor starts. The ARM trusted firmware can provide many services, such as platform initialization, installation of a trusted operating system, and routing of commands at the EL3 layer.
[0074] Next, we will continue to introduce the computing device provided by this application. The computing device provided by this application is mainly a computing device running the above-mentioned ARM processor. Figure 3 , Figure 3 A schematic diagram of a computing device 300 provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the hardware resources of the computing device 300 are divided into the REE side and the TEE side, and the host operating system kernel (also referred to as the host kernel) is located on the REE side. The virtual machine manager in the host operating system kernel (also referred to as the virtual machine manager on the REE side, such as QEMU) is used to manage the ordinary VMs on the REE side, such as creating, starting, and removing ordinary VMs.
[0075] The TEE side includes one or more trusted VMs. Figure 3 In the example, the TEE side includes two trusted VMs, and the REE side can include one or more common VMs. Figure 3 In the example, the REE side includes two common VMs.
[0076] A trusted VM is similar to a common VM, including an operating system kernel and one or more trusted containers, each of which contains an APP. Figure 3 In the example, each VM includes two trusted containers. It can be understood that each trusted VM can be regarded as a Pod. Among them, Pod is the smallest unit created or deployed by Kubernetes. A Pod encapsulates one or more containers (container), storage resources (volume), an independent network IP, and policy options for managing and controlling the operation mode of the container.
[0077] The operating system kernel in the trusted VM can be a powerful general kernel such as Linux, that is, the operating system in the trusted VM can be a powerful general operating system such as Linux. The trusted container can be created using a relatively powerful general container image such as a Linux image, or it can be other types of general container images, and this application does not make specific restrictions on this. It can be understood that when the trusted container is created using a Linux image, the APP in the trusted container can be migrated from a traditional Linux container.
[0078] In a specific implementation, the trusted VM and the common VM may include one or more containers. Figure 3 In the example, each VM includes one container.
[0079] It should be understood that the computing device 300 is only an example provided in the embodiment of the present application, and the computing device 300 may have more Figure 3 The components shown may be implemented with more or fewer components, or with a different arrangement of components.
[0080] Combine the following Figure 4 The flowchart of a data processing method provided by the embodiment of the present application is shown in Figure 3 The process of processing user business by the computing device 300 shown is described in detail.
[0081] like Figure 4 As shown, the method comprises the following steps:
[0082] S401: The processor of the computing device 300 obtains data to be processed on the REE side.
[0083] S402: The processor injects the data to be processed into a first container on the TEE side, where the first container is any trusted container among one or more trusted containers included on the TEE side.
[0084] S403: The processor runs the first container on the TEE side to process the data to be processed.
[0085] The data to be processed can be facial images to be recognized, voice signals to be recognized, text data to be recognized, etc. It can also be models to be trained and training data, or data to be encrypted and stored. This application does not specifically limit the data to be processed.
[0086] The data to be processed can be input into the computing device 300 by the user through the interface provided by the computing device 300. After obtaining the data to be processed input by the user, the computing device 300 stores the data to be processed in the memory on the REE side. The subsequent processor reads the data to be processed from the memory on the REE side and runs the first container for processing.
[0087] In this embodiment, when the data to be processed is a face image to be subjected to face recognition / a voice signal to be subjected to voice recognition / a text data to be subjected to text recognition, after the processor runs the first container on the TEE side to identify the face image / voice signal / text data to obtain the corresponding recognition result, the recognition result can be provided to the user on the REE side. When the data to be processed is a model to be trained and training data, after the processor runs the first container on the TEE side to train the model using the training data to obtain a trained model, the trained model can be provided to the user on the REE side. In other words, the trusted container on the TEE side communicates with the external network of the computing device 300 through the REE side. It can be understood that this can reduce the risk of the trusted container being attacked by attackers from the external network and improve the security of the trusted container.
[0088] When the data to be processed is data to be encrypted and stored, the processor runs the first container on the TEE side to encrypt the data and then stores it in the corresponding location.
[0089] In a possible embodiment, in S401, the data to be processed obtained by the processor on the REE side is encrypted data. Before the processor executes S402, the processor obtains the decryption key for decrypting the encrypted data stored on the TEE side on the TEE side, and then uses the decryption key to decrypt the encrypted data to obtain the plaintext of the data to be processed. The processor then injects the plaintext of the data to be processed into the first container on the TEE side for processing. In other words, the data to be processed exists in an encrypted state on the REE side, and the decryption key is stored on the TEE side. The host operating system kernel and software (such as QEMU, ordinary VM, etc.) on the REE side cannot obtain the decryption key stored on the TEE side. Therefore, even if the attacker breaks through the host operating system kernel and software on the REE side and steals the encrypted data, it cannot decrypt and obtain the plaintext of the data to be processed. In this way, the demand that user data is not stolen by the host operating system kernel and software on the REE side can be met, and user data security can be further improved.
[0090] It is understood that when the computing device 300 executes Figure 4 Before the data processing method shown, it is necessary to create one or more trusted VMs on the TEE side and create a trusted container in each of the one or more trusted VMs. In the present application, after the computing device 300 creates one or more trusted VMs and trusted containers on the TEE side, it can also manage the one or more trusted VMs and trusted containers. The above process is described in detail below.
[0091] (1) The computing device 300 creates a trusted VM on the TEE side:
[0092] The processor of the computing device 300 obtains the configuration information of the trusted VM to be created on the REE side, and then creates the trusted VM on the TEE side according to the configuration information of the trusted VM. The configuration information includes the specifications of the trusted VM to be created, such as the size of the memory, the type of the memory, the size of the memory, the type of the memory, the type of the processor core, the number of processor cores, the computing speed of the processor core, the number of cores of the processor core, the network bandwidth, the operating system kernel and the file system, etc. When creating a trusted VM, the processor can provide the trusted VM with virtual hardware resources that match the configuration information based on the configuration information, for example, based on the memory information included in the configuration information, divide the secure memory that matches the memory information and is used by the trusted VM in the memory resources on the TEE side, simulate the virtual processor core that matches the processor core information and is used by the trusted VM based on the processor core information included in the configuration information, and load the operating system kernel and the file system included in the configuration information into the secure memory corresponding to the trusted VM, etc., so as to achieve the creation of the trusted VM.
[0093] (2) The computing device 300 creates a trusted container in the trusted VM on the TEE side:
[0094] The processor of the computing device 300 obtains the image of the first container to be created on the REE side, and obtains the identification of the first VM used to create the first container, and then locates the first VM in one or more trusted VMs included in the TEE side according to the identification of the first VM, and then loads the image of the first container into the memory of the first VM allocated for use by the first container, and finally creates the first container using the image of the first container in the memory.
[0095] The image of the first container may be any type of container image such as a Linux image, and this application does not make any specific limitation on this.
[0096] (3) Computing device 300 manages trusted container:
[0097] ① The computing device 300 manages the life cycle of the trusted container.
[0098] The processor of the computing device 300 can obtain the first management command for the life cycle of the trusted container on the REE side, and then perform one or any combination of the following operations on the trusted container on the TEE side according to the first management command: start the trusted container, stop the trusted container, remove the trusted container, migrate the trusted container, view the image of the trusted container, and remove the image of the trusted container.
[0099] ② The computing device 300 manages the APP on the trusted container.
[0100] The processor of the computing device 300 can obtain the second management command for the trusted container on the REE side, and then perform one or any combination of the following operations on the trusted container according to the second management command on the TEE side: install, start, shut down, upgrade, uninstall APP and migrate APP.
[0101] ③ Before running the trusted container, the computing device 300 checks the security of the trusted container and the security of the computing device 300.
[0102] In a possible embodiment, the processor can provide the configuration information of the trusted container (such as the type of virtual processor core, the number of virtual processor cores, memory address, etc.), the name of the APP installed on the trusted container, and the hash value of the image of the trusted container, etc., to the user on the REE side for security measurement, that is, the user determines whether the trusted container is a secure container that meets its own expectations, or an unsecure container that poses a security threat. In the case where the processor obtains feedback from the user that the trusted container is a secure container that meets its own expectations, the processor determines that the trusted container is a secure container and runs the trusted container to process user data. Otherwise, the processor determines that the trusted container is an unsecure container and does not run the trusted container to process user data. Optionally, the processor can also check the security of the trusted container in other ways, which is not specifically limited in this application.
[0103] In a possible embodiment, the processor can provide the certificate of the computing device 300 to the user on the REE side for a legitimacy check, that is, the user determines whether the computing device 300 is a secure device that meets his or her expectations, or a non-secure device that poses a security threat. When the processor obtains feedback from the user that the computing device 300 is a secure device that meets his or her expectations, the processor determines that the computing device 300 is a secure device and runs a trusted container to process user data. Otherwise, the processor determines that the computing device 300 is a non-secure device and does not run a trusted container to process user data. Optionally, the processor can also check the security of the computing device 300 in other ways, which is not specifically limited in this application.
[0104] Optionally, if the processor detects that the configuration information of the trusted container, the name of the APP installed on the trusted container, and the hash value of the trusted container's image have been changed during the running of the trusted container, the processor can re-determine the security of the changed trusted container, and run the changed trusted container if it is determined that the changed trusted container is safe, otherwise refuse to run the changed trusted container.
[0105] Optionally, if the processor detects that the certificate of the computing device 300 has expired or detects that there is a security risk in the computing device 300 during the process of running the trusted container, the processor can remind the user on the REE side that the certificate of the computing device 300 has expired or provide the user with the security risk of the computing device 300, allowing the user to determine whether to continue using the computing device 300 to run the trusted container.
[0106] It can be understood that running the trusted container after checking the security of the trusted container and the security of the computing device 300, and continuing to monitor the security of the trusted container and the computing device 300 during the operation of the trusted container, can improve the security of the trusted container, thereby improving the security of user data stored or used in the trusted container.
[0107] ④ The computing device 300 simulates a virtualized IO device for use by the trusted container.
[0108] Before running the trusted container, the processor of the computing device 300 can also simulate virtualized I / O devices such as virtualized disks, VNICs, etc. for use by the trusted container, so that the computing device 300 can implement I / O communication of the trusted container through VirtIO technology. It should be understood that the virtualized I / O devices may also include others, which are not specifically limited in this application.
[0109] ⑤ The computing device 300 manages the communication between the trusted container and the external network of the computing device 300.
[0110] The processor of the computing device 300 can forward data related to the trusted container from the external network of the computing device 300 obtained on the REE side to the trusted container on the TEE side, and can also provide data sent by the trusted container to the external network of the computing device 300 to the external network of the computing device 300 on the REE side.
[0111] It should be noted that in addition to performing the above operations, the processor of the computing device 300 can also perform other operations, such as creating, modifying or destroying the secondary page table on the REE side and / or TEE side, etc. This application does not specifically limit the operations that the processor of the computing device 300 can perform.
[0112] In a possible embodiment, the TEE side of the computing device 300 may include, in addition to the trusted VM, a virtual machine manager for managing the trusted VM, such as Figure 5 As shown, in order to distinguish the virtual machine manager on the TEE side for managing the trusted VM from the virtual machine manager on the REE side for managing the ordinary VM on the REE side, in the following embodiments, the virtual machine manager on the REE side for managing the ordinary VM on the REE side is referred to as the first virtual machine manager, and the virtual machine manager on the TEE side for managing the trusted VM on the TEE side is referred to as the second virtual machine manager. Specifically, the second virtual machine manager runs on the SEL2 layer on the TEE side.
[0113] exist Figure 5 In the embodiment, the host operating system kernel on the REE side of the computing device 300 also includes a container runtime. A container agent module is also deployed in each trusted VM, and the container agent module is used to proxy the trusted container in the trusted VM to which it belongs, such as creating a trusted container, starting a trusted container, forwarding data from a trusted container to other devices / components, or forwarding data from other devices / components to a trusted container.
[0114] exist Figure 5 In the computing device 300 shown, the operations performed by the processor of the computing device 300 on the REE side can be implemented by the processor running the container runtime on the REE side and the first virtual machine manager in collaboration, and the operations performed by the processor of the computing device 300 on the TEE side can be implemented by the processor running the second virtual machine manager on the TEE side and the container proxy module in collaboration. Taking the processor of the computing device 300 starting a trusted container as an example, see Figure 6 The flowchart shown in the figure may include the following steps:
[0115] S601: When the processor runs the container runtime on the REE side, a first management command is generated, where the first management command is used to start a trusted container.
[0116] The container runtime can be k8s, containerd, docker, etc.
[0117] When the processor runs the container runtime on the REE side, the specific process of generating the first management command may be: the shim process in the container runtime on the REE side of the processor generates the first management command. The shim process is a component of the container runtime, which is mainly used to separate the container runtime from the container process. The container runtime starts the trusted container by calling the package function of the runc tool through the shim process, that is, generating the first management command.
[0118] The shim process allows the runc tool in the container runtime to exit after creating and running a trusted container, and serves as the parent process of the trusted container instead of the container runtime. The purpose of this is to ensure that when the trusted container runtime crashes, the shim process is still running normally, so the trusted container is not affected. In addition, the shim process can also collect the exit status of the trusted container and report it to the container runtime.
[0119] S602: The processor runs a container runtime on the REE side and transmits a first management command to a first virtual machine manager on the REE side.
[0120] S603: The processor runs the first virtual machine manager on the REE side to pass the first management command to the second virtual machine manager on the TEE side.
[0121] S604: The processor runs the second virtual machine manager on the TEE side to start the trusted VM to which the trusted container belongs.
[0122] S605: The processor runs the container agent module in the trusted VM to which the trusted container on the TEE side belongs, executes the first management command, and starts the trusted container.
[0123] The process of the processor of the computing device 300 managing the trusted container (such as stopping the trusted container, removing the image of the trusted container, etc.) is similar to Figure 6 The process of starting the trusted container is similar to that shown in the figure, and will not be described in detail here for the sake of brevity.
[0124] In a possible embodiment, Figure 5 As shown, the REE side also includes a shadow of the trusted VM. The shadow of the trusted VM can be used by the processor to save the context of the trusted VM when the processor stops running the trusted VM and runs other programs. When the processor finishes executing other programs and resumes running the trusted VM, the processor restores the context of the trusted VM saved in the shadow of the trusted VM to the trusted VM, thereby resuming the operation of the trusted VM.
[0125] In a possible embodiment, the processor of the computing device 300 may simulate a virtualized I / O device for use by a trusted container through a technology such as VirtIO.
[0126] When the computing device 300 obtains a virtualized I / O device for use by a trusted container through VirtIO technology simulation, such as Figure 7 As shown, the trusted VM on the TEE side of the computing device 300 includes not only the trusted container and the container proxy module, but also the VirtIO front-end driver, the first virtual machine manager includes the VirtIO back-end driver, the second virtual machine manager includes the memory synchronization module, and the memory resources on the TEE side include the first memory (VRING) for the VirtIO front-end driver and the VirtIO back-end driver to perform data transmission ( Figure 7 The memory resources on the REE side include a second memory ( Figure 7 (not shown). The second memory can be regarded as a shadow memory of the first memory, and the second memory is usually the same size as the first memory.
[0127] exist Figure 7 In the computing device 300 shown, specifically, the processor of the computing device 300 can run the VirtIO backend driver to create a virtualized I / O device, and then after starting the trusted VM, run the VirtIO front-end driver in the trusted VM to load the virtualized I / O device, thereby realizing the simulation of the virtualized I / O device. In this way, the computing device 300 can realize the I / O communication of the trusted container through the VirtIO technology.
[0128] The memory synchronization module is used to synchronize the data (hereinafter referred to as the first data) in the first memory that the VirtIO front-end driver needs to send to the VirtIO back-end driver in the second memory during the I / O communication operation of the trusted container implemented by the computing device 300 through the VirtIO technology, and to synchronize the data (hereinafter referred to as the second data) in the second memory that the VirtIO back-end driver needs to send to the VirtIO front-end driver. The first data can also be understood as the data of the external network that the trusted container needs to pass to the computing device 300, and the second data can also be understood as the data from the external network of the computing device 300 that the trusted container needs to receive.
[0129] Next, combine Figure 7 The process of the computing device 300 shown implementing the I / O communication of the trusted container through the VirtIO technology is described in detail.
[0130] (1) Take I / O communication as an example, such as write operation. Figure 8 As shown, the communication process specifically includes the following steps:
[0131] S801: The processor runs the VirtIO front-end driver to write first data into a first memory, where the first memory is a memory on the TEE side used for data transmission between the VirtIO front-end driver and the VirtIO back-end driver.
[0132] S802: The processor runs a memory synchronization module in the second virtual machine manager to synchronize first data in the first memory to the second memory according to a mapping relationship between the first memory and the second memory.
[0133] S803: The processor runs the VirtIO backend driver to read the first data from the second memory.
[0134] (2) Take I / O communication as an example: Figure 8 As shown, the communication process specifically includes the following steps:
[0135] S804: The processor runs the VirtIO backend driver to write the second data into the second memory.
[0136] S805: The processor runs a memory synchronization module to synchronize the second data in the second memory to the first memory according to a mapping relationship between the first memory and the second memory.
[0137] S806: The processor runs the VirtIO front-end driver to read the second data from the first memory.
[0138] It can be seen that in the computing device 300 and the data processing method provided in the present application, the processor of the computing device 300 creates a trusted container on the TEE side and runs the trusted container on the TEE side to process user services. Since the trusted container is deployed on the TEE side, the hardware security features of the TEE can protect the trusted container on the TEE side from being accessed by the host operating system kernel on the REE side. Therefore, even if the attacker breaks into the host operating system kernel on the REE side, he cannot manipulate the trusted container running on the TEE side, thereby protecting the security of the container in the computing device, and then protecting the security of the user data in the container.
[0139] In addition, since different trusted VMs on the TEE side include different trusted containers, even if an attacker breaks into a trusted container in a trusted VM, he can only manipulate the trusted container running in the trusted VM, and cannot manipulate the trusted container running in another trusted VM. Therefore, this solution can further protect the security of containers in computing devices and improve the security of user data.
[0140] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0141] The data processing method provided by the present application is described in detail above. Based on the same inventive concept, the data processing apparatus and computing device provided by the present application are further introduced below.
[0142] It should be understood that the unit modules within the data processing device may also be divided in many ways, and each module may be a software module or a hardware module, or may be partly a software module and partly a hardware module, and this application does not limit this.
[0143] See also Fig. 9 , Fig. 9 The structural diagram of a data processing device 900 exemplarily shown in the embodiment of the present application can be applied to Figure 3 , Figure 5 , Figure 7 The hardware resources shown are divided into a computing device 300 on the REE side and the TEE side, such as Fig. 9 As shown, the data processing device 900 includes: an acquisition module 910 and a processing module 920. The functions of the modules of the data processing device 900 are introduced exemplarily below. It should be understood that the functions of the modules described below are only the functions that the data processing device 900 may have in some embodiments of the present application, and the present application does not limit the functions of the modules.
[0144] The acquisition module 910 is used to acquire the data to be processed on the REE side.
[0145] The processing module 920 is used to run a first container on the TEE side to process the data to be processed, where the first container is any one of the one or more containers (ie, trusted containers) included on the TEE side.
[0146] In a possible embodiment, the TEE side includes one or more VMs (ie, the above-mentioned trusted VMs), and each of the one or more VMs includes at least one container of the one or more containers.
[0147] In a possible embodiment, the data to be processed acquired by the acquisition module 910 on the REE side is encrypted data. Before the processing module 920 runs the first container on the TEE side to process the data to be processed, it is also used to obtain the decryption key stored on the TEE side, and then use the decryption key to decrypt the encrypted data to obtain the plaintext of the data to be processed.
[0148] In a possible embodiment, Fig. 9 As shown, the data processing device 900 also includes: a first verification module 930, which is used to verify whether the first container is a secure container. When the first verification module 930 determines that the first container is a secure container, the processing module 920 runs the first container on the TEE side.
[0149] In a possible embodiment, Fig. 9 As shown, the data processing device 900 also includes: a second verification module 940, which is used to determine whether the computing device 300 to which the data processing device 900 belongs is a security device. When the second verification module 940 determines that the computing device 300 is a security device, the processing module 920 runs the first container on the TEE side.
[0150] In a possible embodiment, the acquisition module 910 is also used to obtain configuration information of one or more VMs to be created on the REE side, the processing module 920 is used to create one or more VMs on the TEE side according to the configuration information, the acquisition module 910 is also used to obtain the image of the first container on the REE side, and obtain the identifier of the first VM used to create the first container on the REE side, and then, the processing module 920 is used to create the first container in the first VM according to the identifier of the first VM on the TEE side, according to the image of the first container, and the first VM belongs to the above-mentioned one or more VMs.
[0151] In a possible embodiment, the acquisition module 910 is used to obtain a first management command for the life cycle of the first container on the REE side; the processing module 920 is used to perform one or any combination of the following operations on the first container according to the first management command on the TEE side: start the first container, stop the first container, remove the first container, migrate the first container, view the image of the first container, and remove the image of the first container.
[0152] In a possible embodiment, the acquisition module 910 is used to obtain a second management command for the first container on the REE side; the processing module 920 is used to perform one or any combination of the following operations on the first container according to the second management command on the TEE side: install, start, shut down, upgrade, uninstall and migrate APP.
[0153] In a possible embodiment, the processing module 920 is further used to provide a processing result to a user on the REE side, where the processing result is obtained by the processor running the first container on the TEE side to process the data to be processed.
[0154] In a possible embodiment, the processing module 920 is further used to simulate and obtain a virtualized I / O device for use by the first container. Optionally, the processing module 920 can simulate and obtain a virtualized I / O device for use by the first container through VirtIO technology.
[0155] In a possible embodiment, the processing module 920 is further used to synchronize the first data in the first memory to the second memory according to the mapping relationship between the first memory and the second memory, the first data being the data that the VirtIO front-end driver needs to send to the VirtIO back-end driver, or to synchronize the second data in the second memory to the first memory according to the mapping relationship between the first memory and the second memory, the second data being the data from the VirtIO back-end driver that the VirtIO front-end driver needs to receive. The first memory is a memory included on the TEE side for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, the second memory is a memory on the REE side, the VirtIO front-end driver is deployed in the virtual machine to which the first container belongs, and the VirtIO back-end driver is deployed in the first virtual machine manager on the REE side.
[0156] Specifically, the specific implementation of various operations performed by the above-mentioned data processing device 900 can refer to the description in the relevant content of the above-mentioned data processing method embodiment, and for the sake of brevity of the specification, it will not be repeated here.
[0157] See also Fig.10 , Fig.10Another structural diagram of a computing device 300 provided in an embodiment of the present application, the computing device 300 includes: a processor 310, a memory unit 320, a communication interface 330, a memory 340, an input device 350 and an output device 360, wherein the processor 310, the memory unit 320, the communication interface 330, the memory 340, the input device 350, and the output device 360 can be interconnected through a bus 370.
[0158] The processor 310 can read the program code (including instructions) stored in the memory unit 320 and execute the program code stored in the memory unit 320, so that the computing device 300 executes the steps in the data processing method provided by the above method embodiment.
[0159] The processor 310 may have a variety of specific implementation forms. For example, the processor 310 may be at least one central processing unit (CPU), such as Fig.10 As shown, including CPU0 and CPU1, processor 310 can also be a graphics processing unit (GPU), etc., and processor 310 can also be a single-core processor or a multi-core processor. Processor 310 can be a combination of a CPU and a hardware chip. The above-mentioned hardware chip can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above-mentioned PLD can be a complex programmable logical device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. Processor 310 can also be implemented by a logic device with built-in processing logic alone, such as an FPGA or a digital signal processor (DSP).
[0160] The memory unit 320 is used to store the kernel, program code, and program data generated when the processor 310 executes the program code stored in the memory unit 320. The program code includes: the code of the acquisition module 910 and the code of the processing module 920, etc. The program data includes: data to be processed, the image of the trusted container, the processing result obtained by the trusted container processing the data to be processed, etc.
[0161] The communication interface 330 may be a wired interface (e.g., an Ethernet interface, a fiber optic interface, other types of interfaces (e.g., an InfiniBand (IB) interface)) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other computing devices or apparatuses. When the communication interface 330 is a wired interface, the communication interface 330 may adopt a protocol family above the transmission control protocol / internet protocol (TCP / IP), such as a remote function call (RFC) protocol, a simple object access protocol (SOAP) protocol, a simple network management protocol (SNMP) protocol, a common object request broker architecture (CORBA) protocol, and a distributed protocol, etc.
[0162] The memory 340 may be a non-volatile memory, such as a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The memory 340 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache.
[0163] The input device 350 may include a mouse and a keyboard, etc. The user may input data or instructions to the computing device 300 through the input device 350, such as the above-mentioned data to be processed, configuration information of the trusted VM, the first management instruction, the second management instruction, etc.
[0164] The output device 360 may include a display, and the output device 360 may provide data to the user through the display, such as providing the user with the result of the trusted VM processing the data to be processed, etc. The display may include a cathode ray tube display (CRT), a plasma display panel (PDP), a liquid crystal display (LCD), etc. Taking the display as an LCD as an example, the liquid crystal display includes a liquid crystal panel and a backlight module, wherein the liquid crystal display panel includes a polarizing film, a glass substrate, a black matrix, a color filter, a protective film, a common electrode, a calibration layer, a liquid crystal layer (liquid crystal, a spacer, a sealant), a capacitor, a display electrode, a prism layer, and a light diffusion layer. The backlight module includes: an illumination light source, a reflector, a light guide plate, a diffuser, a brightness enhancement film (prism sheet) and a frame, etc.
[0165] The bus 370 may be a peripheral component interconnect express (PCIe) or an extended industry standard architecture (EISA) bus. The bus 370 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0166] It should be understood that the computing device 300 according to the embodiment of the present application may correspond to the computing device including the data processing device 900 in the embodiment of the present application, and may correspond to the computing device executing the data processing device 900 in the embodiment of the present application. Figure 4 , Figure 6 , Figure 8 The corresponding subjects in the method shown, and the operations and / or functions of each module in the computing device 300 are respectively to implement Figure 4 , Figure 6 , Figure 8 For the sake of brevity, the corresponding process of the method shown will not be repeated here.
[0167] It should be understood that the computing device 300 is only an example provided in the embodiment of the present application, and the computing device 300 may have more Fig.10 The components shown may be more or less than the components, may be combined with two or more components, or may be implemented with a different configuration of components.
[0168] The present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed, some or all of the steps of the data processing method described in the above embodiment can be implemented.
[0169] The present application also provides a computer program product. When the computer program product is read and executed by a computer, it can implement part or all of the steps of the data processing method recorded in the above method embodiment.
[0170] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0171] In the above embodiments, it can be implemented in whole or in part by software, hardware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium, etc.
[0172] The above is only a specific implementation of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific implementation provided by the present application, which should all be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: Applied to a computing device, the hardware resources of the computing device are divided into a rich execution environment (REE) side and a trusted execution environment (TEE) side, the TEE side includes one or more containers, and the method includes: The processor of the computing device obtains the data to be processed on the REE side; The processor runs a first container on the TEE side to process the data to be processed, where the first container is any one of one or more containers included on the TEE side.
2. The method according to claim 1, characterized in that The TEE side includes one or more virtual machines VM, and each of the one or more VMs includes at least one container of the one or more containers.
3. The method according to claim 1 or 2, characterized in that: The processor obtains the data to be processed on the REE side, including: the processor obtains the encrypted data to be processed on the REE side; Before the processor runs the first container on the TEE side to process the data to be processed, the method further includes: The processor obtains, on the TEE side, a decryption key stored on the TEE side; The processor decrypts the encrypted data to be processed using the decryption key on the TEE side to obtain the data to be processed.
4. The method according to any one of claims 1 to 3, characterized in that: The processor runs the first container on the TEE side, including: When determining that the first container is a secure container, the processor runs the first container on the TEE side.
5. The method according to any one of claims 1 to 4, characterized in that: The processor runs the first container on the TEE side, including: The processor runs the first container on the TEE side when determining that the computing device is a secure device.
6. The method according to any one of claims 1 to 5, characterized in that: Before the processor obtains the data to be processed on the REE side, the method further includes: The processor obtains, on the REE side, configuration information of the one or more VMs to be created; The processor creates the one or more VMs on the TEE side according to the configuration information; The processor obtains the image of the first container on the REE side; The processor obtains, on the REE side, an identifier of a first VM used to create the first container, where the first VM belongs to the one or more VMs; The processor creates the first container according to the image of the first container in the first VM according to the identifier of the first VM on the TEE side.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The processor obtains, on the REE side, a first management command for the life cycle of the first container; The processor performs one or any combination of the following operations on the first container on the TEE side according to the first management command: starting the first container, stopping the first container, removing the first container, migrating the first container, viewing the image of the first container, and removing the image of the first container.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: The processor obtains, on the REE side, a second management command for the first container; The processor performs one or any combination of the following operations on the first container at the TEE side according to the second management command: installing the application, starting the application, closing the application, upgrading the application, uninstalling the application, and migrating the application.
9. The method according to any one of claims 1 to 8, characterized in that: A container runtime and a first virtual machine manager are deployed on the REE side, a second virtual machine manager is deployed on the TEE side, a container proxy module is deployed in the VM to which the first container belongs, and operations performed by the processor on the REE side are collaboratively executed by the processor running the container runtime and the first virtual machine manager, and operations performed by the processor on the TEE side are collaboratively executed by the processor running the second virtual machine manager and the container proxy module.
10. The method according to claim 9, characterized in that The VM to which the first container belongs includes an input / output device virtualization VirtIO front-end driver, the first virtual machine manager includes a VirtIO back-end driver, and the method further includes: The processor runs the VirtIO front-end driver and the VirtIO back-end driver to collaboratively simulate and obtain a virtualized I / O device for use by the first container.
11. The method according to claim 10, characterized in that The TEE side includes a first memory for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, the REE side includes a second memory, the second virtual machine manager is deployed with a memory synchronization module, and the memory synchronization module includes a mapping relationship between the first memory and the second memory; The method further comprises: The processor runs the memory synchronization module to synchronize first data in the first memory to the second memory according to a mapping relationship between the first memory and the second memory, wherein the first data is data that the VirtIO front-end driver needs to send to the VirtIO back-end driver; or, The processor runs the memory synchronization module to synchronize second data in the second memory to the first memory according to a mapping relationship between the first memory and the second memory, where the second data is data from the VirtIO backend driver that the VirtIO front-end driver needs to receive.
12. A computing device, characterized in that: The computing device comprises a processor and a memory; the processor of the computing device is configured to execute instructions stored in the memory of the computing device, so that the computing device executes the method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device, the computing device performs the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Data transaction method and device, electronic equipment and storage medium
CN115617766A
Data storage method and device, electronic equipment and computer readable storage medium
CN116049913A
Secure application execution in a data processing system
US20220129566A1
System and method for performing trusted computing with remote attestation and information isolation on heterogeneous processors over open interconnect
US20220309182A1
Sharing container data inside a tenant's pod under different trusted execution environments (TEES)
US20220391494A1
