Data processing method, apparatus and computer-readable storage medium
By dividing the hardware resources of the computing device into REE and TEE sides, and running the container to process data on the TEE side, the problem of isolation damage to the container after the operating system kernel is compromised, and the security of the container and user data are improved. protection.
Patent Information
- Application Number
- PCT/CN2024/095480
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-14
- Filing Date
- 2024-05-27
- Publication Date
- 2024-12-19
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, ensuring that the TEE side container cannot be controlled even if the REE side is broken.
It effectively protects the security of the container and the security of user data, prevents attackers from stealing data in the container, and improves the overall security of the container.
Smart Images

Figure CN2024095480_19122024_PF_FP_ABST
Abstract
Description
Data processing method, device and computer-readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 14, 2023, with application number 202310705849.8, and priority to the Chinese patent application entitled “Data processing method, device and computer-readable storage medium”, all contents of which are incorporated by reference into this application. Technical Field
[0002] 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
[0003] Containers are a lightweight virtualization technology that leverages the Linux kernel's support for namespaces and process group management (cgroup) to isolate applications (apps) and their dependencies (bins / libs, specifically all the files required to run the app) in an independent runtime environment. Figure 1 shows the architecture of a computing device (such as a server) running containers. The infrastructure can be the computing device's hardware, with the host operating system using the Linux kernel. Namespace technology is used to isolate containers, and cgroup technology is used to allocate container resources, specifically virtualized central processing units (VCPUs) and memory allocated to each container. A container engine (also called a container runtime), similar to a virtual machine monitor (VMM), runs within the host operating system and manages containers. Compared with virtual machines (VMs) that come with their own operating systems, containers do not have operating systems. Instead, they run as processes in the host operating system. Therefore, containers start faster than virtual machines and are particularly suitable for lightweight applications. Moreover, a host can run thousands of containers (processes) simultaneously.
[0004] 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.
[0005] 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.
[0006] Summary of the Invention
[0007] The present application provides a data processing method, apparatus, and computer-readable storage medium, which can reduce the risk of a container being attacked by attackers, improve the security of the container, and thus improve the security of user data in the container.
[0008] 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, where the first container is any one of the one or more containers included on the TEE side.
[0009] In the above solution, 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 an 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.
[0010] 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.
[0011] 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 or she 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.
[0012] In one 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.
[0013] 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 of preventing user data from being stolen by the host operating system kernel and software on the REE side, further improving user data security.
[0014] In a possible implementation, the processor runs the first container on the TEE side when determining that the first container is a secure container.
[0015] Specifically, the processor can provide the configuration information of the first container (such as the virtual processor core type, the number of virtual processor cores, the 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 their expectations or an insecure container that poses a security threat. If the processor obtains feedback from the user that the first container is a secure container that meets their 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 insecure container and does not run the first container to process user data.
[0016] By implementing this implementation method, the processor runs the container to process user data only when it determines that the container is secure. This can avoid using unsafe containers to process user data, which not only improves the security of the container, but also improves the security of user data in the container.
[0017] In a possible implementation, the processor runs the first container on the TEE side when determining that the computing device is a secure device.
[0018] Specifically, the processor may provide the computing device's certificate 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 their expectations or a non-secure device that poses a security threat. If the processor obtains feedback from the user that the computing device is a secure device that meets their 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.
[0019] 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 not only improves the security of the container, but also improves the security of user data in the container.
[0020] In one 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 based on the configuration information on the TEE side. 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. Then, the processor creates the first container based on the image of the first container in the first VM based on the identifier of the first VM on the TEE side, and the first VM belongs to the above one or more VMs.
[0021] 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, which can achieve VM-level container isolation.
[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 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.
[0023] This implementation method can manage the lifecycle of the container on the TEE side.
[0024] 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.
[0025] This implementation method can manage applications in the container on the TEE side.
[0026] In one possible implementation, the REE side is deployed with a container runtime and a first virtual machine manager, the TEE side is deployed with a second virtual machine manager, and the VM to which the first container belongs is deployed with a container proxy module. 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.
[0027] In one possible implementation, the VM to which the first container belongs includes a virtualized input / output (VirtIO) front-end driver, and the first virtual machine manager includes a VirtIO back-end driver. The method provided by the first aspect or any possible implementation 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 and obtain a virtualized I / O device for use by the first container.
[0028] This implementation enables the first container to perform I / O communication through the virtualized I / O device.
[0029] In one 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, and the memory synchronization module includes a mapping relationship between the first memory and the second memory. 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 based on 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 based on the mapping relationship between the first memory and the second memory, wherein the second data is data that the VirtIO front-end driver needs to receive from the VirtIO back-end driver.
[0030] 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.
[0031] In a second aspect, a data processing apparatus is provided. The apparatus 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. The apparatus includes:
[0032] The acquisition module is used to obtain the data to be processed on the REE side;
[0033] The processing module is configured 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.
[0034] 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.
[0035] In one possible implementation, the data to be processed obtained 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, it 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.
[0036] In a possible implementation, the processing module is specifically configured to: when determining that the first container is a secure container, run the first container on the TEE side.
[0037] 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.
[0038] In one possible implementation, the acquisition module is also used to obtain 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 based on the configuration information on the TEE side, the acquisition module 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. Then, the processing module is also used to create the first container based on the image of the first container in the first VM based on the identifier of the first VM on the TEE side, and the first VM belongs to the above-mentioned one or more VMs.
[0039] In one possible implementation, the acquisition module is used to obtain 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.
[0040] In one possible implementation, the acquisition module is used to obtain a 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 the APP.
[0041] 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, and a container agent module is deployed in the VM to which the first container belongs. 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 agent module.
[0042] 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.
[0043] In one possible implementation, the processing module is further configured to synchronize first data in the first memory to the second memory based on a mapping relationship between the first memory and the second memory, where the first data is 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 based on a mapping relationship between the first memory and the second memory, where the second data is data that the VirtIO front-end driver needs to receive from the VirtIO back-end driver. The first memory is 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 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.
[0044] 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.
[0045] In a third aspect, a computing device is provided, comprising a processor and a memory; the processor is configured 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.
[0046] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and the instructions are used to implement the method provided in the first aspect or any possible implementation of the first aspect.
[0047] In a fifth aspect, a computer program product is provided, comprising a computer program, which, when read and executed by a computing device, enables the computing device to perform the method provided in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] FIG1 is a schematic diagram of the architecture of a computing device for running a container provided in an embodiment of the present application;
[0049] FIG2 is a schematic diagram of the hardware architecture of an ARM processor provided in an embodiment of the present application;
[0050] FIG3 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0051] FIG4 is a flow chart of a data processing method provided in an embodiment of the present application;
[0052] FIG5 is a schematic diagram of the structure of another computing device provided in an embodiment of the present application;
[0053] FIG6 is a schematic diagram of a process of starting a trusted container by a computing device according to an embodiment of the present application;
[0054] FIG7 is a schematic diagram of the structure of another computing device provided in an embodiment of the present application;
[0055] FIG8 is a schematic diagram of a process of implementing I / O communication of a trusted container by a computing device according to an embodiment of the present application;
[0056] FIG9 is a schematic structural diagram of a data processing device exemplarily shown in an embodiment of the present application;
[0057] FIG10 is a schematic diagram of the structure of another computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solution provided in this application will be described below in conjunction with the accompanying drawings.
[0059] In order to make the technical solution provided by this application clearer, the relevant terms are first explained.
[0060] (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.).
[0061] (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 and the back-end driver can work together to simulate a series of virtualized I / O devices, such as VirtIO-BLK, VirtIO-NET, etc. Among them, VirtIO-BLK is a virtualized storage device. In fact, VirtIO-BLK is a virtualization program for creating disks (disks are an I / O device). Virtualized disks can be created through VirtIO-BLK; VirtIO-NET is a virtualized network device. Similarly, VirtIO-NET is a virtualization program for creating network devices. Virtualized network devices (such as virtualized network interface controllers (VNICs)) can be created through VirtIO-NET.
[0062] (3) Ordinary VM refers to the VM included on the REE side.
[0063] (4) Trusted VM refers to the VM included on the TEE side, which can also be called confidential VM.
[0064] (5) Ordinary container refers to the container included on the REE side.
[0065] (6) Trusted container refers to the container included on the TEE side, which can also be called a confidential container.
[0066] (7) Container runtime, also known as container engine, is a program that creates and runs containers based on the obtained container image, such as the container orchestration engine (Kubernetes, abbreviated as k8s), the container daemon (containerd), the application container engine (docker), etc. The container runtime can manage the life cycle of the container (including creating / starting / stopping / removing containers) and the life cycle of the container image (including pulling / viewing / removing container images).
[0067] (8) A container image is a special file system that, in addition to providing the programs, libraries, resources, configuration files, and other files 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 classes and instances in object-oriented programming. The container image is a static definition, and the container is the entity of the container image at runtime.
[0068] As shown in Figure 1, a 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 an attacker compromises the operating system kernel, he or she will be able to control all containers running on the operating system kernel and steal user data in the containers.
[0069] Therefore, how to ensure the security of containers in computing devices and prevent attackers from stealing user data in the containers has become an urgent problem to be solved in this field.
[0070] To solve the above problems, the present application provides a computing device and a data processing method. To facilitate understanding of the computing device and data processing method provided by the present application, the TrustZone technology involved in the present application is first introduced below.
[0071] As the performance of advanced RISC (ARM) processors continues to improve, computing devices running ARM processors, such as servers and smart devices, have brought significant convenience to people's lives. At the same time, computing devices carry increasing amounts of user data, and users are increasingly concerned about the security of their computing devices. TrustZone technology is currently the mainstream system-level solution for ARM processors.
[0072] TrustZone technology, first introduced as a security extension in ARMv6, divides a computing device's hardware resources into two worlds: the REE side (also known as the non-secure world) and the TEE side (also known as the secure world). As a hardware security feature, TrustZone operates on the TEE side.
[0073] The REE side doesn't necessarily mean that the operating system (OS) or software running on it is malicious, but rather that the security environment it inhabits is less secure than the TEE side. When the processor operates on the REE side, access to TEE resources (such as registers, memory, cache, and peripherals) is prohibited. Any attempt by the processor to access these resources will result in a system crash. For example, TrustZone can configure the TrustZone Address Space Control (TZASC) and TrustZone Memory Adapter (TZMA) registers to set sensitive memory as secure memory, preventing access from the REE side. When the processor operates on the TEE side, it can access resources on both the TEE and REE sides. Because the TEE side has higher privileges than the REE operating system, TrustZone can serve as a root of trust to provide a higher level of security protection for the REE operating system.
[0074] Taking ARMv8.4 as an example, Figure 2 depicts the ARM hardware architecture. The left side shows the REE architecture, and the right side shows the TEE architecture. The REE includes four layers of working privileges: exception level 0 (EL0), EL1, EL2, and EL3. The TEE also includes four layers: secure exception level 0 (SEL0), SEL1, SEL2, and EL3. EL0 is also known as the user mode layer, EL1 as the kernel mode layer, EL2 as the hypervisor layer, and EL3 as the monitoring layer. Levels with larger numerical values have higher privileges, while levels with smaller numerical values have lower privileges.
[0075] Operating systems closely connected to the user, such as virtual machine operating systems, run at EL0 on the REE side. The host operating system runs at EL1. The virtual machine manager runs at EL2. The ARM trusted firmware (ATF) runs at EL3. The ARM trusted firmware (ATF) is the first component that runs when the processor boots. It provides many services, such as platform initialization, trusted operating system installation, and command routing at the EL3 layer.
[0076] 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. Please refer to Figure 3, which is a schematic diagram of a computing device 300 provided in an embodiment of the present application. As shown in Figure 3, 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 ordinary VMs on the REE side, such as creating, starting, and removing ordinary VMs.
[0077] The TEE side includes one or more trusted VMs. In Figure 3, the TEE side includes two trusted VMs as an example. The REE side may include one or more common VMs. In Figure 3, the REE side includes two common VMs as an example.
[0078] A trusted VM, similar to a regular VM, includes an operating system kernel and one or more trusted containers, each of which contains an app. Figure 3 illustrates the example of two trusted containers in each VM. As you can see, each trusted VM can be considered a Pod. A Pod is the smallest unit created or deployed in Kubernetes. A Pod encapsulates one or more containers, storage resources (volumes), a dedicated network IP address, and policy options for managing and controlling how the containers operate.
[0079] The operating system kernel in the trusted VM can be a powerful general-purpose kernel such as Linux. In other words, the operating system in the trusted VM can be a powerful general-purpose operating system such as Linux. Trusted containers can be created using powerful general-purpose container images, such as Linux images, or other types of general-purpose container images, which are not specifically limited in this application. It is understood that when a trusted container is created using a Linux image, apps in the trusted container can be migrated from traditional Linux containers.
[0080] In a specific implementation, the trusted VM and the common VM may include one or more containers. In FIG3 , it is taken as an example that each VM includes one container.
[0081] 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 or fewer components than those shown in FIG. 3 , or may have different configurations of components.
[0082] The following describes in detail the process of the computing device 300 shown in Figure 3 processing user services in conjunction with the flowchart of a data processing method provided in an embodiment of the present application shown in Figure 4.
[0083] As shown in FIG4 , the method includes the following steps:
[0084] S401: The processor of the computing device 300 obtains data to be processed on the REE side.
[0085] 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.
[0086] S403: The processor runs the first container on the TEE side to process the data to be processed.
[0087] 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.
[0088] 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.
[0089] In this embodiment, when the data to be processed is a facial image to be subjected to face recognition, a voice signal to be subjected to voice recognition, or text data to be subjected to text recognition, the processor, after running a first container on the TEE side to recognize the facial image, voice signal, or text data and obtaining a corresponding recognition result, can provide the recognition result to the user on the REE side. When the data to be processed is a model to be trained and training data, the processor, after running a first container on the TEE side to train the model using the training data and obtaining a trained model, can provide the trained model 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 via 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.
[0090] 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.
[0091] 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. This can meet the demand that user data is not stolen by the host operating system kernel and software on the REE side, further improving user data security.
[0092] It is understood that before the computing device 300 executes the data processing method shown in Figure 4, it is necessary to first 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 this 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.
[0093] (1) The computing device 300 creates a trusted VM on the TEE side:
[0094] 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 the 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, the processor can divide the memory resources on the TEE side into a secure memory that matches the memory information and is used by the trusted VM, simulate a 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 file system included in the configuration information into the secure memory corresponding to the trusted VM, etc., thereby achieving the creation of the trusted VM.
[0095] (2) The computing device 300 creates a trusted container in the trusted VM on the TEE side:
[0096] The processor of the computing device 300 obtains the image of the first container to be created on the REE side, and obtains the identifier 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 identifier of the first VM, and then loads the image of the first container into the memory allocated for use by the first container in the memory of the first VM, and finally creates the first container using the image of the first container in the memory.
[0097] The image of the first container can be any type of container image, such as a Linux image, and this application does not make any specific restrictions on this.
[0098] (3) The computing device 300 manages the trusted container:
[0099] ① The computing device 300 manages the lifecycle of the trusted container.
[0100] 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.
[0101] ② The computing device 300 manages the APP on the trusted container.
[0102] The processor of the computing device 300 can obtain a 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.
[0103] ③ Before running the trusted container, the computing device 300 checks the security of the trusted container and the security of the computing device 300.
[0104] 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 trusted container image, 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 his or her expectations, or a non-secure 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 his or her 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 non-secure 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.
[0105] In one 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 their expectations or a non-secure device that poses a security threat. If the processor obtains feedback from the user that the computing device 300 is a secure device that meets their expectations, the processor determines that the computing device 300 is a secure device and runs the trusted container to process user data. Otherwise, the processor determines that the computing device 300 is a non-secure device and does not run the 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.
[0106] 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 image have been changed during the operation 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.
[0107] Optionally, if the processor detects that the certificate of the computing device 300 has expired or that there is a security risk in the computing device 300 while the processor is 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.
[0108] 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.
[0109] ④ The computing device 300 simulates and obtains a virtualized IO device for use by the trusted container.
[0110] Before running the trusted container, the processor of computing device 300 can also simulate virtualized I / O devices, such as virtualized disks and VNICs, for use by the trusted container. This allows computing device 300 to implement I / O communication within the trusted container using VirtIO technology. It should be understood that virtualized I / O devices may also include other devices, which are not specifically limited in this application.
[0111] ⑤ The computing device 300 manages the communication between the trusted container and the external network of the computing device 300.
[0112] 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.
[0113] 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. This application does not specifically limit the operations that the processor of the computing device 300 can perform.
[0114] In one 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. As shown in FIG5 , 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 in the SEL2 layer on the TEE side.
[0115] In Figure 5 , the host operating system kernel on the REE side of computing device 300 also includes a container runtime. Each trusted VM also deploys a container agent module, which is used to proxy the trusted container in the trusted VM, such as creating a trusted container, starting a trusted container, forwarding data from the trusted container to other devices / components, and vice versa.
[0116] In the computing device 300 shown in FIG5 , 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. 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 agent module in collaboration. Taking the example of the processor of the computing device 300 starting a trusted container, referring to the flowchart shown in FIG6 , the process may include the following steps:
[0117] S601: When the processor runs the container runtime on the REE side, it generates a first management command, where the first management command is used to start a trusted container.
[0118] The container runtime can be k8s, containerd, docker, etc.
[0119] When the processor runs the container runtime on the REE side, the specific process of generating the first management command may be: the processor runs the shim process in the container runtime on the REE side and generates the first management command. The shim process is a component of the container runtime and is primarily 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, thereby generating the first management command.
[0120] The shim process allows the runc tool in the container runtime to exit after creating and running a trusted container. It then becomes the parent process of the trusted container, rather than the container runtime. This ensures that if the trusted container runtime crashes, the shim process remains operational, ensuring that the trusted container remains unaffected. Furthermore, the shim process collects the exit status of the trusted container and reports it to the container runtime.
[0121] 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.
[0122] 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.
[0123] S604: The processor runs the second virtual machine manager on the TEE side to start the trusted VM to which the trusted container belongs.
[0124] 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.
[0125] 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 the process of starting the trusted container shown in Figure 6. For the sake of brevity of the specification, it will not be elaborated here.
[0126] In one possible embodiment, as shown in FIG5 , 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.
[0127] In a possible embodiment, the processor of the computing device 300 may simulate a virtualized I / O device for use by the trusted container through technologies such as VirtIO.
[0128] When the computing device 300 simulates a virtualized I / O device for use by a trusted container through VirtIO technology, as shown in FIG7 , the trusted VM on the TEE side of the computing device 300 includes, in addition to the trusted container and container proxy module, a VirtIO front-end driver, a first virtual machine manager includes a VirtIO back-end driver, and a second virtual machine manager includes a memory synchronization module. The memory resources on the TEE side include a first memory (VRING) (not shown in FIG7 ) for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, and the memory resources on the REE side include a second memory (not shown in FIG7 ) that is mapped to the first memory. 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.
[0129] In the computing device 300 shown in Figure 7, the processor of computing device 300 can specifically run the VirtIO backend driver to create a virtualized I / O device. Then, after starting the trusted VM, the processor can run the VirtIO front-end driver in the trusted VM to load the virtualized I / O device, thereby emulating the virtualized I / O device. In this way, computing device 300 can implement I / O communication within the trusted container using VirtIO technology.
[0130] The memory synchronization module is used to synchronize data in the first memory that the VirtIO front-end driver needs to send to the VirtIO back-end driver (hereinafter referred to as first data) to the second memory during the I / O communication operation of the trusted container implemented by the computing device 300 using VirtIO technology, and to synchronize data in the second memory that the VirtIO back-end driver needs to send to the VirtIO front-end driver (hereinafter referred to as second data) to the first memory. The first data can also be understood as data on the external network that the trusted container needs to transmit to the computing device 300, and the second data can also be understood as data on the external network that the trusted container needs to receive from the computing device 300.
[0131] Next, the process of implementing I / O communication of a trusted container through VirtIO technology using the computing device 300 shown in FIG7 is described in detail.
[0132] (1) Taking I / O communication as an example of a write operation, as shown in FIG8 , the communication process specifically includes the following steps:
[0133] S801: The processor runs a 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.
[0134] 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.
[0135] S803: The processor runs the VirtIO backend driver to read the first data from the second memory.
[0136] (2) Taking the I / O communication as a read operation as an example, as shown in FIG8 , the communication process specifically includes the following steps:
[0137] S804: The processor runs the VirtIO backend driver to write the second data into the second memory.
[0138] 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.
[0139] S806: The processor runs the VirtIO front-end driver to read the second data from the first memory.
[0140] It can be seen that in the computing device 300 and the data processing method provided in this 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 business. 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 further protecting the security of the user data in the container.
[0141] 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.
[0142] 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 this application.
[0143] 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.
[0144] It should be understood that the unit modules within the data processing device can also be divided into multiple types. Each module can be a software module, a hardware module, or partly a software module and partly a hardware module. This application does not limit this.
[0145] Referring to Figure 9, Figure 9 is a schematic structural diagram of a data processing device 900 exemplarily shown in an embodiment of the present application, which can be applied to the computing device 300 in which the hardware resources shown in Figures 3, 5, and 7 are divided into the REE side and the TEE side. As shown in Figure 9, the data processing device 900 includes: an acquisition module 910 and a processing module 920. The functions of each module of the data processing device 900 are exemplarily introduced below. It should be understood that the functions of each module described below are only 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 each module.
[0146] The acquisition module 910 is configured to acquire the data to be processed on the REE side.
[0147] The processing module 920 is configured to run 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 (ie, trusted containers) included on the TEE side.
[0148] In a possible embodiment, the TEE side includes one or more VMs (ie, the trusted VMs mentioned above), and each of the one or more VMs includes at least one container of the one or more containers.
[0149] In a possible embodiment, the data to be processed obtained 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 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.
[0150] In a possible embodiment, as shown in FIG9 , the data processing device 900 further includes: a first verification module 930 for verifying whether the first container is a secure container; and the processing module 920 runs the first container on the TEE side when the first verification module 930 determines that the first container is a secure container.
[0151] In a possible embodiment, as shown in FIG9 , the data processing device 900 further includes: a second verification module 940 for determining whether the computing device 300 to which the data processing device 900 belongs is a security device; and the processing module 920 runs the first container on the TEE side when the second verification module 940 determines that the computing device 300 is a security device.
[0152] 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, and 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. Then, the processing module 920 is used to create 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, and the first VM belongs to the above-mentioned one or more VMs.
[0153] In a possible embodiment, an acquisition module 910 is used to obtain a first management command for the life cycle of a first container on the REE side; a 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: 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.
[0154] In one 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 the APP.
[0155] In a possible embodiment, the processing module 920 is further configured 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.
[0156] In a possible embodiment, the processing module 920 is further configured to simulate and obtain a virtualized I / O device for use by the first container. Optionally, the processing module 920 may simulate and obtain a virtualized I / O device for use by the first container using VirtIO technology.
[0157] In one possible embodiment, processing module 920 is further configured to synchronize first data in the first memory to the second memory based on a mapping relationship between the first memory and the second memory, where the first data is 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 based on a mapping relationship between the first memory and the second memory, where the second data is data that the VirtIO front-end driver needs to receive from the VirtIO back-end driver. The first memory is memory included on the TEE side for data transmission between the VirtIO front-end driver and the VirtIO back-end driver, and the second memory is 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.
[0158] 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 description, it will not be repeated here.
[0159] Refer to Figure 10, which is another 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.
[0160] in,
[0161] 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 performs the steps in the data processing method provided by the above method embodiment.
[0162] The processor 310 can have a variety of specific implementation forms. For example, the processor 310 can be at least one central processing unit (CPU), as shown in Figure 10, including CPU0 and CPU1. The processor 310 can also be a graphics processing unit (GPU), etc. The processor 310 can also be a single-core processor or a multi-core processor. The processor 310 can be a combination of a CPU and a hardware chip. The above-mentioned hardware chip can be implemented as an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above-mentioned PLD can be implemented as a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 310 can also be implemented solely using a logic device with built-in processing logic, such as an FPGA or a digital signal processor (DSP).
[0163] 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, and the program data includes the data to be processed, the image of the trusted container, and the processing results obtained by the trusted container on the data to be processed.
[0164] The communication interface 330 may be a wired interface (e.g., an Ethernet interface, a fiber optic interface, or 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 employ a protocol suite above the Transmission Control Protocol / Internet Protocol (TCP / IP), such as the Remote Function Call (RFC) protocol, the Simple Object Access Protocol (SOAP) protocol, the Simple Network Management Protocol (SNMP) protocol, the Common Object Request Broker Architecture (CORBA) protocol, and distributed protocols, etc.
[0165] Memory 340 may be a non-volatile memory, such as read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Memory 340 may also be a volatile memory, such as random access memory (RAM), which is used as an external cache.
[0166] 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 aforementioned data to be processed, configuration information of the trusted VM, the first management instruction, the second management instruction, etc.
[0167] 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 results of the processing of the to-be-processed data by the trusted VM as described above. The display may include a cathode ray tube display (CRT), a plasma display panel (PDP), a liquid crystal display (LCD), and the like. Taking an LCD display 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, spacer, sealant), a capacitor, a display electrode, a prism layer, and a light-scattering 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, and the like.
[0168] Bus 370 may be a Peripheral Component Interconnect Express (PCIe) or Extended Industry Standard Architecture (EISA) bus. Bus 370 may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, FIG10 shows only one thick line, but this does not imply that there is only one bus or only one type of bus.
[0169] 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 executing the corresponding subjects in the methods shown in Figures 4, 6, and 8 in the embodiments of the present application, and the operations and / or functions of each module in the computing device 300 are respectively for implementing the corresponding processes of the methods shown in Figures 4, 6, and 8. For the sake of brevity, they will not be repeated here.
[0170] It should be understood that computing device 300 is only an example provided for an embodiment of the present application, and computing device 300 may have more or fewer components than those shown in FIG. 10 , may combine two or more components, or may have different configuration implementations of the components.
[0171] 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.
[0172] The present application also provides a computer program product. When the computer program product is read and executed by a computer, it can implement some or all of the steps of the data processing method described in the above method embodiment.
[0173] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0174] In the above embodiments, it can be implemented in whole or in part by software, hardware or any combination thereof. When software is used for implementation, 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 device. 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, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. 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.
[0175] The above is only a specific embodiment of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific embodiment provided in this application, and all such changes or substitutions shall fall within the scope of protection of this 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 on 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 processing method and apparatus, and computer-readable storage medium
CN119149163B
Container isolation enhancement system based on ARM TrustZone
CN108733455A
Apparatus and method for dynamic configuration of trusted application access control
CN113614720A
Virtual encryption machine platform based on trusted technology and creation method thereof
CN114117412A
Communication method in computer system and related product
CN116257368A
