A process security optimization method and system based on hardware isolation

By employing a hardware-based process security optimization method, leveraging jailhouse and shared memory to control and isolate the process running system domain, process-level hardware isolation is achieved. This addresses the issues of high resource consumption in virtual machine-level isolation and insufficient security in container isolation, thereby improving the security and startup performance of critical processes.

CN123137789APending Publication Date: 2026-11-20KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611206358.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies suffer from high resource consumption and insufficient security in virtual machine-level isolation, failing to meet the high-security isolation requirements of critical processes.

Method used

A hardware-isolated process security optimization method is adopted. By using jailhouse and shared memory to control and isolate the process running system domain, and by using hardware isolation process management module and hardware isolation process response module, process-level hardware isolation is achieved to ensure that critical processes have exclusive access to hardware resources, and resource requirements are reduced by using Unikernel system image.

Benefits of technology

It achieves process-level hardware isolation, improves process security and startup performance, reduces system domain resource requirements, supports flexible communication between isolated hardware processes and other processes, and improves system versatility and security while maintaining the strength of hardware isolation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137789A_ABST
    Figure CN123137789A_ABST
Patent Text Reader

Abstract

The application discloses a process security optimization method and system based on hardware isolation. A hardware isolation process management module running in an isolated process management system domain creates a virtual isolated process for a target process that needs to be isolated, calls Jailhouse to create an isolated process running system domain and allocate exclusive hardware isolated resources, loads an Unikernel system image to run the hardware isolated process, and binds the created virtual isolated process and the corresponding isolated process running system domain to each other. When an operating system of the isolated process management system domain performs a management operation on the virtual isolated process, the hardware isolated process management module captures the operation and converts it into an inter-domain communication instruction sent to a hardware isolated process response module of the corresponding isolated process running system domain, which performs a peer operation on the hardware isolated process and returns a result to update the state of the virtual isolated process. The application realizes process-level hardware isolation, ensures that a key process exclusively occupies corresponding hardware resources, provides a higher-level process security method, reduces the demand of a slave system domain for resources, and improves the real-time performance, flexibility and response performance of the slave system domain startup.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to process isolation technology, specifically to a process security optimization method and system based on hardware isolation. Background Technology

[0002] Traditional hypervisors (such as KVM) isolate at the virtual machine (VM) level, including a complete operating system, which requires significant hardware resources and has a very slow startup and loading speed. Traditional virtual machine technologies such as KVM and Xen are resource-intensive, have slow startup speeds, and have high hardware requirements. Process-level isolation, on the other hand, allows the hypervisor to directly manage independent processes. Traditional hypervisors struggle to meet the process-level isolation needs in resource-sensitive scenarios.

[0003] While container technology offers the advantage of being lightweight, its isolation level is at the operating system level, which exposes it to host kernel attack surfaces. As a result, its security performance is inferior to hardware-level virtualization technology, and it cannot meet the high security isolation requirements of critical processes. Summary of the Invention

[0004] The technical problem to be solved by this invention is that existing technologies suffer from high resource consumption and insufficient security in container isolation.

[0005] To address the aforementioned problems in existing technologies, a process security optimization method and system based on hardware isolation is provided. This method provides process-level hardware isolation to ensure that critical processes exclusively occupy corresponding hardware resources. It also provides a higher level of process security by significantly reducing the resource requirements of the system domain through process replacement of the operating system, thereby improving the startup and response performance of the system domain.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A hardware-isolated process security optimization method is disclosed. The method is applied to a process security optimization system comprising an isolated process management system domain and multiple isolated process runtime system domains. The isolated process management system domain controls each isolated process runtime system domain through jailhouse and shared memory. The isolated process management system domain includes a hardware isolated process management module, and each isolated process runtime system domain includes a hardware isolated process response module. The method includes the following steps: The hardware isolation process management module creates a corresponding virtual isolation process for the target process that needs to be isolated, calls jailhouse to create a corresponding isolation process runtime system domain, allocates exclusive hardware isolation resources to the isolation process runtime system domain, loads the Unikernel system image, and creates and runs the hardware isolation process in the isolation process runtime system domain. The hardware isolation process is the running instance of the target process in the Unikernel system of the isolation process runtime system domain. When the operating system of the isolated process management system domain performs process management operations on the virtual isolated process, the hardware isolated process management module captures the process management operation information and sends it to the hardware isolated process response module of the isolated process running system domain. The hardware isolated process response module performs a peer operation on the hardware isolated process according to the process management operation information and returns the operation result to the hardware isolated process management module. The hardware isolated process module updates the status and related information of the virtual isolated process.

[0007] Furthermore, the hardware isolation process management module creates corresponding virtual isolation processes for the target processes that need to be isolated. When calling jailhouse to create the corresponding isolation process to run the system domain, it includes: If the static creation mode is adopted, the hardware isolation process management module reads the virtual hardware isolation process configuration file, obtains the generated Unikernel system image and the recipe information of the isolation process runtime system domain; creates the corresponding virtual isolation process, calls Jailhouse to create the isolation process runtime system domain based on the recipe information of the isolation process runtime system domain, and binds the virtual isolation process to the isolation process runtime system domain; and controls the isolation process runtime system domain to load the Unikernel system image. If a dynamic creation mode is adopted, the hardware isolation process management module first creates a corresponding virtual isolation process, obtains the hardware resource requirements and process-related information of the target process; based on the hardware resource requirements and process-related information, it generates the isolation process runtime system domain recipe information and the Unikernel system image; it calls Jailhouse to create the isolation process runtime system domain based on the isolation process runtime system domain recipe information, binds the isolation process runtime system domain to the virtual isolation process, and updates the virtual hardware isolation process configuration file; and it controls the isolation process runtime system domain to load the Unikernel system image.

[0008] Furthermore, the Unikernel system image is generated from a Unikernel system base image template and corresponding isolated process code. The Unikernel system base image template consists of basic libraries and basic runtime code trimmed from a specified operating system, which must run within the corresponding isolated process runtime system domain. The specified operating system is either the operating system of the isolated process management system domain or another operating system. This ensures that the Unikernel system image is not limited to the operating system type corresponding to the isolated process management system domain. Other operating system processes running within the isolated process management system domain can migrate and run processes from different operating systems by generating a Unikernel system image for the corresponding operating system and binding the corresponding isolated process runtime system domain to the virtual isolated process of the corresponding isolated process management system domain.

[0009] Furthermore, the Unikernel system image can optionally have other functions added, enhancing the functionality of the corresponding isolated hardware processes and the functionality of the corresponding isolated processes managing the virtual isolated processes of the jailhouse isolated system domain, i.e., implementing the hardware isolated process decorator function. Furthermore, this invention provides a method for managing the operating system corresponding to the jailhouse isolated system domain through process binding.

[0010] Furthermore, after the hardware isolation process management module captures the process management operation, it also includes: if the process management operation is a run operation, the hardware isolation process management module starts the hardware isolation process and the hardware isolation process response module in the isolation process running system domain; When the hardware isolation process response module performs peer operations on the hardware isolation process according to the inter-domain communication instructions, specifically, after the hardware isolation process response module starts, it reads the running status information of the hardware isolation process and sends it to the hardware isolation process management module. The hardware isolation process management module updates the status and related information of the virtual isolation process according to the running status information.

[0011] Furthermore, after capturing process management operation information, the hardware isolation process management module also includes: if the process management operation is a suspension operation, the hardware isolation process management module sends hardware isolation process suspension information to the hardware isolation process response module; When the hardware isolation process response module performs a peer operation on the hardware isolation process according to the process management operation information, specifically, the hardware isolation process response module saves the current running information of the hardware isolation process, stops the hardware isolation process, and returns the isolation process stop running information to the hardware isolation process management module. The hardware isolation process management module suspends the running system domain of the isolation process according to the isolation process stop running information and updates the status of the corresponding virtual isolation process.

[0012] Furthermore, after capturing process management operation information, the hardware isolation process management module also includes: if the process management operation is a deletion operation, the hardware isolation process management module sends hardware isolation process deletion information to the hardware isolation process response module; When the hardware isolation process response module performs a peer operation on the hardware isolation process according to the process management operation information, specifically, the hardware isolation process response module stops the hardware isolation process, relinquishes the corresponding exclusive hardware isolation resources, and returns isolation process reclamation running information to the hardware isolation process management module. The hardware isolation process management module deletes the isolation process running system domain and reclaims the corresponding hardware resources according to the isolation process reclamation running information.

[0013] Furthermore, after capturing process management operation information, the hardware isolation process management module further includes: if the process management operation is a memory management operation, the hardware isolation process management module checks its legality; If the memory management operation is a memory allocation operation, after the legality is verified, the hardware isolation process management module sends memory allocation information to the hardware isolation process response module. After receiving the memory allocation information, the hardware isolation process response module notifies the hardware isolation process that the corresponding memory is available. If the memory management operation is a memory reclamation and allocation operation, after the legality is verified, the hardware isolation process management module sends memory reclamation information to the hardware isolation process response module. The hardware isolation process response module attempts to reclaim the corresponding memory while ensuring the normal operation of the hardware isolation process. If the reclamation fails, it returns memory reclamation failure information to the hardware isolation process management module. If the reclamation is successful, it returns memory resource reclamation success information. When the hardware isolation process module receives the memory reclamation failure information, it rejects the corresponding memory reclamation. When it receives the memory resource reclamation success information, it reclaims the corresponding shared memory resources and returns memory reclamation success information.

[0014] Furthermore, the method also includes: When other operating system processes in the isolation process management domain send IPC information to the virtual isolation process, the hardware isolation process management module captures the IPC information and sends it to the hardware isolation process response module through inter-domain communication. The hardware isolation process response module forwards the IPC information to the hardware isolation process and sends the response information returned by the hardware isolation process back to the hardware isolation process management module through inter-domain communication to update the virtual isolation process.

[0015] Furthermore, other operating system processes within the isolation process management system domain are authorized operating system processes within the isolation process management system domain; unauthorized operating system processes are invisible to and cannot operate on the virtual isolation process.

[0016] Furthermore, when the hardware isolation process management module captures process management operation information and sends it to the hardware isolation process response module of the isolated process running system domain, specifically, the hardware isolation process management module captures the management operation information of the operating system of the isolated process management system domain on the virtual isolated process through eBPF, and converts it into corresponding inter-domain communication instructions and sends them to the hardware isolation process response module of the isolated process running system domain. The protocol used by the inter-domain communication instructions includes at least one of shared memory, ivshmem, virtual network, or isolated communication soft bus.

[0017] This invention also proposes a process security optimization system, including an isolated process management system domain and multiple isolated process runtime system domains. The isolated process management system domain controls each isolated process runtime system domain through jailhouse and shared memory. The isolated process management system domain includes a hardware isolated process management module, and the isolated process runtime system domain includes a hardware isolated process response module. The system is configured to execute the hardware-isolated process security optimization method described above.

[0018] Compared with the prior art, the advantages of the present invention are as follows: This invention runs Unikernel through jailhouse, providing process-level hardware isolation, ensuring that critical processes exclusively occupy corresponding hardware resources, run directly on hardware devices, have real-time performance, and eliminate intermediate call steps in traditional virtualization.

[0019] This invention binds the corresponding process to the Unikernel image created and running in jailhouse. It captures the management operations of the main system domain's operating system on the virtual isolated process through the hardware isolation process management module, converts them into inter-domain communication instructions, and executes peer operations through the hardware isolation process response module. This provides a higher level of process security. By replacing the operating system with a process, it greatly reduces the resource requirements of the slave system domain and improves the startup and response performance of the slave system domain. At the same time, it supports communication between the isolated hardware process and other ordinary processes, improving flexibility, versatility, and security while maintaining the strength of hardware isolation. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the system architecture according to an embodiment of the present invention.

[0021] Figure 2 This is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation

[0022] The present invention will be further described below with reference to the accompanying drawings and specific preferred embodiments, but this does not limit the scope of protection of the present invention.

[0023] Unikernel is a minimalist kernel architecture compiled specifically for a single application or process. It compiles the application and necessary operating system libraries into a single image, which runs directly in a lightweight execution environment abstracted by the Hypervisor. Because Unikernel does not include redundant components found in traditional operating systems (such as multi-user management, generic device drivers, system services, etc.), it has resource consumption levels close to those of containers and millisecond-level startup speeds, but with higher security: relying on the Hypervisor's memory and CPU virtualization technology, its inter-process isolation level is equivalent to the hardware-level isolation between virtual machines (VMs). Unikernel images can run in both virtualized and bare-metal hardware environments.

[0024] Jailhouse is a Linux-based static partitioning hypervisor that partitions physical hardware resources and runs independent operating systems or bare-metal applications in isolated hardware system domains (cells), meeting the Unikernel's requirements for exclusive hardware resources and real-time operation. By compiling applications with a minimalist kernel (such as MirageOS or Rumprun) into a single image and directly loading and running it using Jailhouse, each Unikernel instance can correspond to an independent hardware-isolated process.

[0025] This embodiment proposes a process security optimization method based on hardware isolation, which realizes a process-level management collaboration mechanism between the Unikernel system in the slave system domain and the operating system in the master system domain. The operating system in the master system domain manages the Unikernel instance running in the hardware-isolated slave system domain in the same way as a local ordinary process, performing full lifecycle operations such as creation, running, suspending, deletion, inter-process communication (IPC), and memory management, which greatly reduces the resource requirements of the slave system domain and improves the startup and response performance of the slave system domain.

[0026] This method is applied to Figure 1 The process security optimization system shown is, for example Figure 1As shown, the process security optimization system is based on hardware isolation, including an isolated process management system domain and multiple isolated process runtime system domains. The isolated process management system domain controls each isolated process runtime system domain through jailhouse and shared memory. The isolated process management system domain runs a Linux operating system and includes a hardware isolated process management module, a virtual hardware isolated process configuration file, and virtual isolated processes. The virtual hardware isolated process configuration file is used to store information about the created isolated process runtime system domains. After the isolated process runtime system domain is created, the corresponding system image and hardware resource recipe are saved in the corresponding directory. When the hardware isolated process management module needs to use the corresponding isolated process runtime system domain, it reads the corresponding virtual hardware isolated process configuration file. Each isolated process runtime system domain is isolated from the underlying hardware resources through jailhouse and runs a unikernel system image or an operating system such as Linux or RTOS. It includes hardware isolated processes and hardware isolated process response modules. The hardware isolated processes are application processes isolated to the isolated process runtime system domain through jailhouse, that is, the running instances of the target processes to be isolated in the unikernel system or operating system such as Linux or RTOS in the isolated process runtime system domain. The isolated process management system domain and each of the isolated process running system domains exchange information through an inter-domain communication protocol.

[0027] Taking the entire lifecycle operation of a Unikernel instance as an example, the hardware isolation process management module and the hardware isolation process response module jointly implement the following functions: When the isolation process management system domain creates a static hardware isolation process, the hardware isolation process management module reads the contents of the virtual hardware isolation process configuration file, obtains the generated Unikernel system image and the recipe information of the isolation process runtime system domain, and creates the corresponding isolation process runtime system domain by reading the recipe information; at the same time, it creates the corresponding virtual hardware isolation process and binds the corresponding isolation process runtime system domain to the corresponding virtual hardware isolation process; the isolation process runtime system domain loads the corresponding Unikernel system image; When the isolation process management system domain creates a dynamic hardware isolation process, the hardware isolation process management module first creates the corresponding virtual hardware isolation process, obtains the hardware resources and process-related information of the corresponding hardware isolation process, and generates the isolation process runtime system domain recipe and Unikernel system image based on the hardware resources and process-related information of the hardware isolation process. The specific process includes: 1) Obtaining the hardware resources required by the corresponding isolation process through procfs, etc., and obtaining the hardware devices occupied by the corresponding isolation process through lsof, etc.; 2) Generating the isolation process runtime system domain recipe through jailhouse's built-in or other isolation system domain generation scripts based on the obtained hardware resources and hardware devices occupied by the isolation process; 3) Preparing the Unikernel system basic image template (including the trimmed basic library and basic runtime code, etc.) and the corresponding isolation process code, and generating the corresponding Unikernel system image through modules such as Unikraft; Because the Unikernel system image runs in hardware isolation, the Unikernel system image is not limited to the operating system type corresponding to the isolated process management system domain. For example, if the isolated process management system domain runs Linux, the Unikernel system image for the corresponding isolated process running system domain can be generated using methods such as trimming and POSIX compatibility for Linux, RTOS, etc., and must meet the requirement of running in the corresponding isolated process running system domain. The corresponding hardware isolated process can run on Unikernel system images generated based on different operating system environments. The hardware isolated process leverages the characteristics of different operating systems to achieve different running functions. The code corresponding to the hardware isolated process is compatible with running on different operating systems, such as Ubuntu running in the isolated process management system domain and Unikernel system images generated based on CentOS and Zephyr real-time systems in the corresponding isolated process running system domain. Then, the corresponding isolated process running system domain is created using the generated isolated process running system domain recipe and the Unikernel system image; simultaneously, the corresponding isolated process running system domain is bound to the corresponding virtual hardware isolated process, and the virtual hardware isolated process configuration file is updated; the isolated process running system domain loads the corresponding Unikernel system image. Further, other operating system processes can be migrated and run by generating a Unikernel system image for the corresponding operating system and binding the corresponding isolated process's runtime system domain to a virtual isolated process within the corresponding isolated process management system domain. For example, if the isolated process management system domain runs a Linux operating system, and the corresponding Zephyr real-time system process is used as a hardware isolated process to generate a Unikernel system image, a corresponding isolated process runtime system domain is generated based on the Zephyr real-time system process information, and the corresponding Zephyr real-time system hardware isolated process is loaded and run to generate the Unikernel system image. This runtime system domain is then bound to a virtual isolated process within the corresponding isolated process management system domain. The virtual isolated process manages the corresponding Zephyr real-time system hardware isolated process, and the corresponding Zephyr real-time system hardware isolated process communicates with other processes within the isolated process management system domain.

[0028] Furthermore, the Unikernel system image can optionally add other functions to enhance the functionality of the corresponding isolated hardware processes and the functionality of the corresponding isolated processes managing the corresponding virtual isolated processes of the system domain, thus implementing a hardware isolated process decorator function. For example, adding a relevant custom logging function component to the Unikernel system image means that the corresponding isolated hardware processes can have the corresponding custom logging function without modification, and the corresponding virtual isolated processes of the system domain can have the corresponding custom logging function, without affecting other ordinary processes. Furthermore, this invention provides a method for managing the operating system corresponding to the jailhouse isolated system domain through process binding.

[0029] When the isolation process management system domain runs the corresponding hardware isolation process, the hardware isolation process management module quickly starts the hardware isolation process and hardware isolation process response module of the isolation process running system domain; after the hardware isolation process response module starts, it reads the hardware isolation process running status information and sends it to the hardware isolation process management module; the hardware isolation process management module obtains the running status of the corresponding hardware isolation process and updates the corresponding virtual hardware isolation process. When the isolation process management system domain receives the hardware isolation process running status information from the hardware isolation process response module of the isolation process running system domain, the hardware isolation process management module updates the virtual hardware isolation process status.

[0030] When the isolation process management domain suspends the corresponding virtual hardware isolation process, the hardware isolation process management module sends the hardware isolation process suspension information to the hardware isolation process response module of the corresponding isolation process running system domain. The hardware isolation process response module saves the current hardware isolation process running information, stops the corresponding hardware isolation process from running, and returns the corresponding isolation process stop running information to the hardware isolation process management module. After receiving the stop information, the hardware isolation process management module suspends the corresponding isolation process running system domain.

[0031] When the isolation process management system domain deletes the corresponding virtual hardware isolation process, the hardware isolation process management module sends the deletion information to the hardware isolation process response module of the corresponding isolation process running system domain. The hardware isolation process response module stops the current hardware isolation process from running, relinquishes the corresponding hardware resources, and returns the corresponding isolation process recycling running information to the hardware isolation process management module. After receiving the recycling running information, the hardware isolation process management module deletes the corresponding isolation process running system domain and reclaims the corresponding hardware resources.

[0032] When other operating system processes in the isolation process management system domain send IPC information to the corresponding virtual isolated process, the hardware isolation process management module captures the corresponding IPC information and sends it to the hardware isolation process response module of the corresponding isolated process running system domain through inter-domain communication; at the same time, the hardware isolation process management module can obtain the IPC information sent by the hardware isolation process response module of the corresponding isolated process running system domain, and respond to and update the corresponding virtual isolated process information. When the isolation process management system domain performs memory management on the corresponding virtual isolation process, the hardware isolation process management module captures the corresponding memory management operation, checks whether the memory management is legal, and then performs the following: 1) When performing a memory allocation operation, the hardware isolation process management module allocates shared memory resources to the corresponding isolated process running system domain and sends memory allocation information to the hardware isolation process response module of the corresponding isolated process running system domain; after receiving the memory allocation information, the corresponding hardware isolation process response module notifies the hardware isolation process that the corresponding memory is available. 2) When performing memory reclamation and allocation operations, the hardware isolation process management module sends memory or information to the hardware isolation process response module of the system domain in which the process to be isolated runs. When the hardware isolation process response module receives the memory reclamation information, it attempts to reclaim the memory of the corresponding hardware isolation process while ensuring the normal operation of the hardware isolation process. The memory reclamation of the hardware isolation process is stopped by the jailhouse of the isolation process management system domain, and the memory of the corresponding hardware isolation process is reclaimed to the isolation process management system domain. When the shared memory resource fails, a memory reclamation failure message is sent. When the memory resource reclamation is successful, a memory resource reclamation success message is sent. When the hardware isolation process management module receives the corresponding memory reclamation failure message, it rejects the corresponding memory reclamation. When the hardware isolation process management module receives the corresponding memory resource reclamation success message, it reclaims the corresponding shared memory resource and returns a memory reclamation success message. During the above process, the hardware isolation process management module captures the operation information of the corresponding virtual hardware isolation process and sends it to the hardware isolation process response module of the corresponding isolation process running system domain through inter-domain communication. The hardware isolation process response module receives the virtual hardware isolation process operation information sent by the corresponding hardware isolation process management module and operates the hardware isolation process. When the running status of the hardware isolation process changes, the hardware isolation process response module reads the running status information of the hardware isolation process and sends it to the hardware isolation process management module.

[0033] Further, the jailhouse management of the isolated process system domain manages the allocation and reclamation of relevant hardware resources of the corresponding isolated process running system domain. These hardware resources include memory, clock, CPU core, peripherals (i2c, ADC, SPI, and other CPU hardware peripheral resources).

[0034] In addition, when the hardware isolation process response module starts, it reads the running status information of the hardware isolation process and sends it to the hardware isolation process management module; when the hardware isolation process response module receives the hardware isolation process suspension information, it saves the current running information of the hardware isolation process, stops the running of the corresponding hardware isolation process, and returns the corresponding isolation process stop running information to the hardware isolation process management module; when the hardware isolation process response module receives the hardware isolation process deletion information, it stops the current running of the hardware isolation process, relinquishes the corresponding hardware resources, and returns the corresponding isolation process recovery running information to the hardware isolation process management module.

[0035] Based on the above functions, the method of this embodiment is as follows: Figure 2 As shown, it includes the following steps: S1: Process creation phase.

[0036] The hardware isolation process management module creates a corresponding virtual isolation process for the target process that needs to be isolated, calls jailhouse to create a corresponding isolation process runtime system domain, allocates exclusive hardware isolation resources to the isolation process runtime system domain, and loads a Unikernel system image (a Unikernel system image for hardware isolation processes compatible with operating systems such as Linux or RTOS). The hardware isolation process is created and runs in the isolation process runtime system domain. The hardware isolation process is the running instance of the target process in the Unikernel system or RTOS system of the isolation process runtime system domain.

[0037] Specifically, the hardware isolation process management module creates a virtual hardware isolation process in the isolation process management system domain, binds it to the isolation process runtime system domain created through Jailhouse, and establishes a one-to-one mapping relationship between the virtual hardware isolation process and the hardware isolation processes in the isolation process runtime system domain.

[0038] In static creation mode, the hardware isolation process management module reads the virtual hardware isolation process configuration file to obtain the generated Unikernel system image and the recipe information for the isolation process runtime system domain. The recipe information includes descriptions of static hardware resources allocated to the domain, such as CPU cores, memory regions, and device passthrough configurations. Based on the recipe information, the hardware isolation process management module calls Jailhouse to create the isolation process runtime system domain, simultaneously creating and binding the virtual hardware isolation process. The isolation process runtime system domain loads the corresponding system image and starts running. The virtual hardware isolation process configuration file is used to store the created isolation process runtime system domain information. After each domain is created, its system image and hardware resource recipe are stored in the corresponding directory for subsequent use by the hardware isolation process management module.

[0039] In dynamic creation mode, the hardware isolation process management module first creates a virtual hardware isolation process and obtains the hardware resource requirements and process-related information of the corresponding target process. Then, it obtains the hardware resources required by the corresponding hardware isolation process through the virtual hardware isolation process, calls Jailhouse to automatically generate a recipe script, generates a Jailhouse recipe for the isolation process's runtime system domain, and uses the Unikernel system base image template corresponding to the Linux or RTOS operating system and the hardware isolation process to generate a Unikernel system image. Subsequently, Jailhouse is called to create the isolation process runtime system domain based on the recipe, binds this domain to the virtual hardware isolation process, and updates the virtual hardware isolation process configuration file to record the configuration information of the newly created instance. Finally, it controls the isolation process runtime system domain to load the corresponding Unikernel system image.

[0040] S2: Process operation phase.

[0041] When the operating system of the isolated process management system domain performs process management operations on a virtual isolated process, the hardware isolated process management module captures the process management operation information and sends it to the hardware isolated process response module of the isolated process running system domain. The hardware isolated process response module performs a peer operation on the hardware isolated process according to the process management operation information and returns the operation result to the hardware isolated process management module. The hardware isolated process module updates the status and related information of the virtual isolated process. Specifically, this includes: If the process management operation is a run operation, the hardware isolation process management module sends a start command to the corresponding isolated process running system domain to quickly start the hardware isolation process and hardware isolation process response module within that domain. After the hardware isolation process response module starts, it immediately reads the hardware isolation process running status information and sends it to the hardware isolation process management module. After obtaining the running status of the corresponding hardware isolation process, the hardware isolation process management module updates the virtual hardware isolation process status and related information. During the operation of the hardware isolation process, if its running status changes, the hardware isolation process response module reads the changed hardware isolation process running status information and sends it to the hardware isolation process management module to maintain synchronization between the virtual process status of the main system domain and the actual process status of the slave system domain.

[0042] If the process management operation is a suspension operation, the hardware isolation process management module sends hardware isolation process suspension information to the hardware isolation process response module of the corresponding isolated process running system domain. Upon receiving the suspension information, the hardware isolation process response module saves the current hardware isolation process running information, stops the corresponding hardware isolation process, and returns the corresponding isolated process stop information to the hardware isolation process management module. Upon receiving the stop information, the hardware isolation process management module suspends the corresponding isolated process running system domain and updates the state of the corresponding virtual isolated process, releasing the non-persistent hardware resources occupied by that domain, but retains its memory context for subsequent recovery.

[0043] If the process management operation is a deletion operation, the hardware isolation process management module sends hardware isolation process deletion information to the hardware isolation process response module in the corresponding isolated process's running system domain. Upon receiving the deletion information, the hardware isolation process response module stops the current hardware isolation process from running, relinquishes the corresponding exclusive hardware isolation resources, and returns the corresponding isolated process recycling running information to the hardware isolation process management module. Upon receiving the recycling running information, the hardware isolation process management module deletes the corresponding isolated process's running system domain and reclaims the corresponding hardware resources, while simultaneously clearing the corresponding record in the virtual hardware isolation process configuration file.

[0044] If the process management operation is a memory management operation, the hardware-isolated process management module captures the corresponding memory management operation, checks whether the corresponding memory management is valid, and then performs the following: Memory allocation operation: The hardware isolation process management module allocates shared memory resources to the corresponding isolated process running system domain and sends memory allocation information to the hardware isolation process response module of the corresponding isolated process running system domain; after receiving the memory allocation information, the hardware isolation process response module notifies the hardware isolation process that the corresponding memory is available.

[0045] Memory reclamation operation: The hardware isolation process management module sends memory reclamation information to the hardware isolation process response module in the corresponding isolated process's running system domain. Upon receiving the memory reclamation information, the hardware isolation process response module attempts to reclaim the memory of the corresponding hardware isolation process while ensuring its normal operation. If shared memory resource reclamation fails, a memory reclamation failure message is sent; if memory resource reclamation succeeds, a memory resource reclamation success message is sent. When the hardware isolation process management module receives a corresponding memory reclamation failure message, it rejects the corresponding memory reclamation; when it receives a corresponding memory resource reclamation success message, it reclaims the corresponding shared memory resource and returns a memory reclamation success message.

[0046] Furthermore, in this embodiment, other operating system processes within the isolated process management system domain can send IPC information to the virtual hardware isolation process. The hardware isolation process management module can also obtain IPC information actively sent by the hardware isolation process response module of the corresponding isolated process's running system domain, enabling bidirectional cross-domain communication. When other operating system processes within the isolated process management system domain send IPC information to the virtual hardware isolation process, the hardware isolation process management module captures the corresponding IPC information and sends it to the hardware isolation process response module of the corresponding isolated process's running system domain via inter-domain communication. The hardware isolation process response module forwards the IPC information to the hardware isolation process and returns the response information from the hardware isolation process to the hardware isolation process management module via inter-domain communication. After obtaining the response information, the hardware isolation process management module responds and updates the corresponding virtual hardware isolation process information.

[0047] In step S2 of this embodiment, the hardware isolation process management module captures the operations of the Linux system corresponding to the isolation process management domain on the management of virtual hardware isolation processes, IPC communication and memory management through eBPF and other methods. It converts the corresponding operations into inter-domain communication instructions suitable for the target system domain running environment (Unikernel or RTOS) and sends them to the hardware isolation process response module of the corresponding isolation process running system domain through inter-domain communication.

[0048] After receiving information such as scheduling, IPC communication, and memory management of the corresponding virtual hardware isolation process, the hardware isolation process response module performs corresponding hardware isolation process management, IPC, and memory management operations based on the received process management, IPC, and memory management information, and returns the corresponding process scheduling, IPC, and memory management operation information to the hardware isolation process management module. Upon receiving the corresponding operation information, the hardware isolation process management module parses and modifies the corresponding virtual hardware isolation process information.

[0049] Furthermore, all operations performed by the operating system of the isolation process management system domain on the virtual hardware isolation process are captured by the hardware isolation process management module and implemented through the hardware isolation process response module of the corresponding isolation process running system domain.

[0050] In step S2 of this embodiment, the hardware isolation process management module manages the permissions of the corresponding virtual hardware isolation process: for the isolation process, the authorized processes of the operating system running in the system domain can operate with each other; for unauthorized processes, they are invisible and cannot operate with each other.

[0051] The hardware isolation process management module manages all operations performed by other processes running the operating system within the system domain on the hardware isolation process, significantly improving the independence and security of the isolated hardware process. Hardware isolation ensures the exclusive access of the hardware isolation process to the responding hardware, while also making the hardware of the hardware isolation process invisible to other isolated process management system domain processes.

[0052] In step S2 of this embodiment, the hardware isolation process management module and the hardware isolation process response module communicate with each other through an inter-domain communication protocol. The inter-domain communication protocol includes, but is not limited to, shared memory, ivshmem, virtual networks, and isolated communication soft buses.

[0053] The effectiveness of the method proposed in this embodiment will be verified through specific examples below.

[0054] The isolation process management system domain runs the Galaxy Kylin operating system. The Galaxy Kylin operating system loads and runs the hardware isolation process management module. The hardware isolation process management module creates two virtual hardware isolation processes: one virtual hardware isolation process is bound to the Unikernel system corresponding to an operating system such as Linux or RTOS, and the other virtual hardware isolation process is bound to the Zephyr system.

[0055] The hardware isolation process management module calls Jailhouse to generate two corresponding isolation process runtime system domains, running the Unikernel system and the Zephyr system respectively. Each isolation process runtime system domain runs a hardware isolation process response module to maintain and manage the corresponding hardware isolation process.

[0056] When the Kylin operating system running in the isolated process management system domain performs operations (including process management, IPC, and memory management) on a corresponding virtual hardware isolated process, the hardware isolated process management module captures the corresponding operation and sends the operation information to the hardware isolated process response module in the corresponding isolated process's running system domain via inter-domain communication. The hardware isolated process response module in the corresponding isolated process's running system domain then operates on the corresponding hardware isolated process and returns the corresponding operation information to the hardware isolated process management module in the isolated process management system domain. The hardware isolated process management module obtains the returned operation information, processes it, and updates the corresponding virtual hardware isolated process.

[0057] Furthermore, the isolation process management system domain can create multiple virtual hardware isolation processes to bind multiple isolation process running system domains, enabling the batch application of virtual hardware isolation processes.

[0058] In the above example, the OS image running in the isolated process's runtime system domain is a Unikernel or RTOS system. It boasts a startup and loading speed an order of magnitude lower than containers, lower resource consumption, and millisecond-level startup and shutdown times. Virtual process management mapping and scheduling achieves response times close to those of actual process scheduling. The hardware isolated process combines the low startup and shutdown performance of containers with the isolation of traditional virtual machines, while running directly on isolated hardware, resulting in higher real-time performance and eliminating the resource consumption associated with traditional virtual machine switching. Furthermore, the hardware isolated process management module can obtain the hardware resources required by the corresponding virtual isolated process through its creation and automatically generate the recipe script using jailhouse to create the corresponding isolated process's runtime system domain. The hardware isolated process management module maintains the corresponding isolated virtual process to prevent conflicting use of hardware resources and also maintains the virtual hardware isolated process configuration file.

[0059] In summary, this invention proposes a process security optimization method and system based on hardware isolation. The hardware isolation process management module of the operating system running in the isolated process management system domain binds processes requiring hardware isolation to corresponding virtual isolated processes. Simultaneously, it maps the corresponding virtual isolated processes to the hardware isolation processes of the Unikernel system in the corresponding isolated process's running system domain. The operating system in the isolated process management system domain controls the hardware isolated processes by managing the isolated virtual processes, and equally controls the Unikernel system and the corresponding hardware isolated processes during operations such as running, suspending, and deleting the corresponding virtual isolated processes. Simultaneously, the hardware isolation process management module reads the Unikernel system information of the corresponding slave system domain and maintains the corresponding information for the virtual isolated processes. The corresponding slave system domain hardware isolation process response module receives control information from the hardware isolation process management module, controls the hardware isolation process of the Unikernel system in the slave system domain, and returns information to the hardware isolation process management module in the master system domain. This invention provides process-level hardware isolation, ensuring that critical processes exclusively occupy corresponding hardware resources. It also provides a higher level of process security methods, significantly reducing the resource requirements of the slave system domain and improving the startup and response performance of the slave system domain through process replacement of the operating system.

[0060] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0061] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A process security optimization method based on hardware isolation, characterized in that, The method is applied to a process security optimization system including an isolated process management system domain and multiple isolated process runtime system domains. The isolated process management system domain controls each isolated process runtime system domain through jailhouse and shared memory. The isolated process management system domain includes a hardware isolated process management module, and the isolated process runtime system domain includes a hardware isolated process response module. The method includes the following steps: The hardware isolation process management module creates a corresponding virtual isolation process for the target process that needs to be isolated, calls jailhouse to create a corresponding isolation process runtime system domain, allocates exclusive hardware isolation resources to the isolation process runtime system domain, loads the Unikernel system image, and creates and runs the hardware isolation process in the isolation process runtime system domain. The hardware isolation process is the running instance of the target process in the Unikernel system of the isolation process runtime system domain. When the operating system of the isolated process management system domain performs process management operations on the virtual isolated process, the hardware isolated process management module captures the process management operation information and sends it to the hardware isolated process response module of the isolated process running system domain. The hardware isolated process response module performs a peer operation on the hardware isolated process according to the process management operation information and returns the operation result to the hardware isolated process management module. The hardware isolated process module updates the status and related information of the virtual isolated process.

2. The process security optimization method based on hardware isolation according to claim 1, characterized in that, The hardware isolation process management module creates corresponding virtual isolation processes for the target processes that need to be isolated. When calling jailhouse to create the corresponding isolation process to run the system domain, it includes: If the static creation mode is adopted, the hardware isolation process management module reads the virtual hardware isolation process configuration file, obtains the generated Unikernel system image and the recipe information of the isolation process runtime system domain; creates the corresponding virtual isolation process, calls Jailhouse to create the isolation process runtime system domain based on the recipe information of the isolation process runtime system domain, and binds the virtual isolation process to the isolation process runtime system domain; and controls the isolation process runtime system domain to load the Unikernel system image. If a dynamic creation mode is adopted, the hardware isolation process management module first creates a corresponding virtual isolation process, obtains the hardware resource requirements and process-related information of the target process; based on the hardware resource requirements and process-related information, it generates the isolation process runtime system domain recipe information and the Unikernel system image; it calls Jailhouse to create the isolation process runtime system domain based on the isolation process runtime system domain recipe information, binds the isolation process runtime system domain to the virtual isolation process, and updates the virtual hardware isolation process configuration file; and it controls the isolation process runtime system domain to load the Unikernel system image.

3. The process security optimization method based on hardware isolation according to claim 2, characterized in that, The Unikernel system image is generated from a Unikernel system base image template and corresponding isolated process code. The Unikernel system base image template is a basic library and basic runtime code that has been trimmed from a specified operating system and meets the requirement of running in the corresponding isolated process runtime system domain. The specified operating system is the operating system of the isolated process management system domain or other operating systems, so that the Unikernel system image is not limited to the operating system type corresponding to the isolated process management system domain. Other operating system running processes in the isolated process management system domain can achieve the migration and running of processes from different operating systems by generating a Unikernel system image of the corresponding operating system and binding the corresponding isolated process runtime system domain to the virtual isolated process of the corresponding isolated process management system domain.

4. The process security optimization method based on hardware isolation according to claim 1, characterized in that, After the hardware isolation process management module captures the process management operation, it further includes: if the process management operation is a run operation, the hardware isolation process management module starts the hardware isolation process and the hardware isolation process response module in the isolation process running system domain; When the hardware isolation process response module performs peer operations on the hardware isolation process according to the inter-domain communication instructions, specifically, after the hardware isolation process response module starts, it reads the running status information of the hardware isolation process and sends it to the hardware isolation process management module. The hardware isolation process management module updates the status and related information of the virtual isolation process according to the running status information.

5. The process security optimization method based on hardware isolation according to claim 1, characterized in that, After capturing process management operation information, the hardware isolation process management module further includes: if the process management operation is a suspension operation, the hardware isolation process management module sends hardware isolation process suspension information to the hardware isolation process response module; When the hardware isolation process response module performs a peer operation on the hardware isolation process according to the process management operation information, specifically, the hardware isolation process response module saves the current running information of the hardware isolation process, stops the hardware isolation process, and returns the isolation process stop running information to the hardware isolation process management module. The hardware isolation process management module suspends the running system domain of the isolation process according to the isolation process stop running information and updates the status of the corresponding virtual isolation process.

6. The process security optimization method based on hardware isolation according to claim 1, characterized in that, After capturing process management operation information, the hardware isolation process management module further includes: if the process management operation is a deletion operation, the hardware isolation process management module sends hardware isolation process deletion information to the hardware isolation process response module; When the hardware isolation process response module performs a peer operation on the hardware isolation process according to the process management operation information, specifically, the hardware isolation process response module stops the hardware isolation process, relinquishes the corresponding exclusive hardware isolation resources, and returns isolation process reclamation running information to the hardware isolation process management module. The hardware isolation process management module deletes the isolation process running system domain and reclaims the corresponding hardware resources according to the isolation process reclamation running information.

7. The process security optimization method based on hardware isolation according to claim 1, characterized in that, After the hardware isolation process management module captures the process management operation information, it further includes: if the process management operation is a memory management operation, the hardware isolation process management module checks its legality; If the memory management operation is a memory allocation operation, after the legality is verified, the hardware isolation process management module sends memory allocation information to the hardware isolation process response module. After receiving the memory allocation information, the hardware isolation process response module notifies the hardware isolation process that the corresponding memory is available. If the memory management operation is a memory reclamation and allocation operation, after the legality is verified, the hardware isolation process management module sends memory reclamation information to the hardware isolation process response module. The hardware isolation process response module attempts to reclaim the corresponding memory while ensuring the normal operation of the hardware isolation process. If the reclamation fails, it returns memory reclamation failure information to the hardware isolation process management module. If the reclamation is successful, it returns memory resource reclamation success information. When the hardware isolation process module receives the memory reclamation failure information, it rejects the corresponding memory reclamation. When it receives the memory resource reclamation success information, it reclaims the corresponding shared memory resources and returns memory reclamation success information.

8. The process security optimization method based on hardware isolation according to claim 1, characterized in that, The method further includes: When other operating system processes in the isolation process management system domain send IPC information to the virtual isolation process, the hardware isolation process management module captures the IPC information and sends it to the hardware isolation process response module through inter-domain communication. Other operating system processes in the isolation process management system domain are authorized operating system processes in the isolation process management system domain. Unauthorized operating system processes are invisible to and cannot operate on the virtual isolation process. The hardware isolation process response module forwards the IPC information to the hardware isolation process and sends the response information returned by the hardware isolation process back to the hardware isolation process management module through inter-domain communication to update the virtual isolation process.

9. The process security optimization method based on hardware isolation according to claim 1, characterized in that, When the hardware isolation process management module captures process management operation information and sends it to the hardware isolation process response module of the isolated process running system domain, specifically, the hardware isolation process management module captures the management operation information of the operating system of the isolated process management system domain on the virtual isolated process through eBPF, and converts it into corresponding inter-domain communication instructions and sends them to the hardware isolation process response module of the isolated process running system domain. The protocol used by the inter-domain communication instructions includes at least one of shared memory, ivshmem, virtual network, or isolated communication soft bus.

10. A process security optimization system, characterized in that, The system includes an isolated process management system domain and multiple isolated process runtime system domains. The isolated process management system domain controls each isolated process runtime system domain through jailhouse and shared memory. The isolated process management system domain includes a hardware isolated process management module, and the isolated process runtime system domain includes a hardware isolated process response module. The system is configured to execute the hardware-isolated process security optimization method according to any one of claims 1 to 9.