A method and system for guiding jailhouse startup based on authentication
By guiding jailhouse execution after authentication operations in the secure world, the problem that jailhouse startup sequence in the existing technology cannot guarantee program integrity and credibility is solved, and high security and trustworthy startup of the virtualized environment is achieved.
Patent Information
- Application Number
- CN202510001595.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-02
AI Technical Summary
In the prior art, the startup sequence of jailhouse cannot guarantee the integrity and credibility of the program, and is susceptible to hijacking and tampering by malware.
After performing authentication operations in the secure world, boot jailhouse to execute. Through the authentication mechanism when loading the jailhouse driver and executing command line programs, ensure the integrity and trustworthiness of the virtual machine monitor at startup.
By performing authentication operations in the secure world, the security of the virtualized environment is significantly improved, preventing malware from intrusion and tampering, and ensuring the integrity and credibility of jailhouse.
Smart Images

Figure CN119396537B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of virtual machines, and in particular to a method and system for starting a jailhouse based on authentication guidance. Background Art
[0002] Generally speaking, virtual machine monitors have two structural types: Type-I and Type-II. Type-I virtual machine monitors are a thin layer of software that runs independently on the hardware / firmware layer; while Type-II virtual machine monitors run on the host operating system. On a virtualization platform based on hardware partitions of domain virtualization software, each hardware partition runs a client operating system. At the same time, fixed hardware resources (such as CPU, memory, and peripherals) are also statically divided into partitions. The virtual machine monitor manages each partition and maintains a controlled communication channel on the basis of isolation. The domain virtualization software has a master control node, which usually runs the Linux operating system and is responsible for completing the system initialization and providing an administrator interface. The master control node does not have control authority over all hardware resources. When the virtual machine monitor completes initialization and a new partition is created, the relevant hardware resources will be directly divided into the corresponding partition and managed by the operating system running in the partition. If we look at the system structure at runtime, jailhouse is a type C virtual machine monitor. However, unlike the Type-I virtual machine monitor, its system initialization process depends on the master Linux partition. But it is not like a Type-II virtual machine monitor diagram, which implements runtime management through the host operating system. It is more like a hybrid structure of Type-I and Type-II, where the main control Linux partition is used as the bootloader of the virtual machine monitor rather than a privileged management domain.
[0003] Jailhouse is different from the traditional Type-I virtual machine monitor. Type-I virtual machine monitor is started through uboot and then Linux is started through hypervisor. However, jailhouse first loads jailhouse.ko in the ordinary world after Linux is started, and then starts jailhouse through the jailhouse command line tool to take over Linux. Such a startup sequence cannot guarantee the integrity and credibility of the program and is vulnerable to hijacking and tampering by malware. Summary of the invention
[0004] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a method and system for booting a jailhouse based on authentication are provided. By booting the jailhouse execution after performing an authentication operation in the secure world, the integrity and credibility of the virtual machine monitor at startup can be ensured, and the intrusion and tampering of malicious software can be prevented.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A method for booting a jailhouse based on authentication includes booting a jailhouse based on authentication on a computer device including a general operating system in a normal world and a secure operating system in a secure world:
[0007] When the jailhouse client application CA in the general operating system needs to load the jailhouse driver, a request to load the jailhouse driver is sent to the secure operating system through the secure operating system driver TEE driver in the general operating system;
[0008] The secure operating system authenticates the jailhouse driver after receiving the request;
[0009] If the authentication is successful, the secure operating system will load the jailhouse driver from the secure world where the secure operating system is located to the ordinary world where the general operating system is located; if the authentication fails, it will end and exit;
[0010] After detecting the jailhouse driver loaded into the ordinary world, the jailhouse client application CA in the general operating system loads the jailhouse driver to complete the initialization operation of jailhouse startup.
[0011] Optionally, the general operating system sends a request to load the jailhouse driver to the secure operating system, including: the jailhouse client application CA in the general operating system executes and sends a request to load the driver to the secure operating system through security monitoring calling SMC, so that the security monitoring calls SMC in response to the request to load the corresponding callback function.
[0012] Optionally, the secure operating system authenticating the jailhouse driver after receiving the request includes: authenticating the jailhouse driver in the secure world through a callback function in the secure operating system.
[0013] Optionally, when the authentication fails, the method further includes releasing resources occupied when calling the callback function.
[0014] Optionally, after loading the jailhouse driver to complete the initialization operation of jailhouse startup, the step further includes:
[0015] When the jailhouse client application CA in the general operating system needs to execute a command line program, a request to execute the command line program is sent to the secure operating system through the secure operating system driver TEE driver in the general operating system;
[0016] The secure operating system authenticates the command line program after receiving the request;
[0017] If the authentication is successful, the secure operating system will transfer the authentication result from the secure world where the secure operating system is located to the ordinary world where the general operating system is located; if the authentication fails, it will end and exit;
[0018] After detecting the authentication result transmitted to the ordinary world, the jailhouse client application CA in the general operating system chooses whether to execute the command line program according to the authentication result.
[0019] Optionally, the authentication of the jailhouse driver includes checking the integrity of the jailhouse driver and checking the signature credibility of the jailhouse driver's request. Only when the integrity check of the jailhouse driver and the signature credibility check of the jailhouse driver's request pass, the authentication is determined to be successful; otherwise, it is determined to be an authentication failure. The authentication of the command line program includes checking the signature credibility of the request to execute the command line program. If the signature credibility check of the request to execute the command line program passes, the authentication is determined to be successful; otherwise, it is determined to be an authentication failure.
[0020] Optionally, selecting whether to execute the command line program according to the authentication result includes: if the authentication result is authentication passed, the jailhouse client application CA in the operating system executes the command line program; otherwise, the jailhouse client application CA in the operating system does not execute the command line program.
[0021] The present invention also provides a system for booting a jailhouse based on authentication, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute any one of the methods for booting a jailhouse based on authentication.
[0022] The present invention also proposes a computer-readable storage medium, in which a computer program or instruction is stored. The computer program or instruction is programmed or configured to execute any one of the methods for booting a jailhouse based on authentication through a processor.
[0023] The present invention also provides a computer program product, comprising a computer program or an instruction, wherein the computer program or the instruction is programmed or configured to execute any one of the methods for booting a jailhouse based on authentication through a processor.
[0024] Compared with the prior art, the present invention mainly has the following advantages:
[0025] The present invention performs authentication from the secure world and guides the jailhouse to start, thereby realizing the integrity and credibility verification of the jailhouse during the system startup process, significantly improving the security of the virtualized environment. The present invention is applicable to various computing systems that require high security and credible startup, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a schematic diagram of the ARM TrustZone architecture.
[0027] Figure 2 The figure is a flow chart of loading a jailhouse driver program when the jailhouse is started based on authentication in an embodiment of the present invention.
[0028] Figure 3 The figure is a flow chart of executing a command line program when a jailhouse is started based on authentication in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] Before introducing the specific embodiments of the present invention, related concepts or terms are first explained.
[0030] Jailhouse is a semi-virtualized lightweight virtualization solution led by Siemens. Jailhouse focuses on the partitioning of hardware resources rather than the sharing and virtualization of hardware resources, so it can minimize the overhead and latency introduced by virtualization. According to business needs, resources such as CPU, memory, device interface, interrupt, etc. are allocated before running, and the security and independence of resource allocation are guaranteed during the running process, so that a multi-core CPU can be divided into multiple independent operating environments, each of which can run different operating systems and deploy different businesses.
[0031] ARM TrustZone is a hardware security technology used to create two isolated execution environments on a single physical processor: the Secure World and the Normal World. Figure 1As shown. This technology is designed to enhance the security of the system, making it able to resist various attacks while protecting sensitive data and code. TrustZone technology is widely used in mobile devices, embedded systems and other computing environments that require high security.
[0032] The ARM architecture introduces TrustZone technology, which achieves higher security by dividing the system into a secure world and a non-secure world. On this basis, the ARM EL3 level allows developers to run a security monitor (SPM) at the highest privilege level to manage and coordinate the security functions of the system.
[0033] The GP standard clearly defines the interfaces provided by the REE (Rich Execution Environment, a business execution environment. Compared with TEE, it is a traditional server operating environment.) side and the TEE (Trusted Execution Environment, a trusted environment that protects confidential data based on isolation (generally hardware-based architecture) mechanism, compared with REE.) side for CA (Client Application) and TA (Trust Application) to call, including the function name, function, parameter description, return value, etc. of the interface function. During the development of CA and TA, it is necessary to follow the interfaces defined by the GP standard to achieve communication and data transfer between TA and CA.
[0034] Embodiment 1
[0035] This embodiment proposes a method for booting a jailhouse based on authentication, which aims to utilize the security features of ARM TrustZone, authenticate through the operating system of the secure world, and then boot and execute the jailhouse from the normal world in the secure world, and take over the operating system of the normal world. By performing authentication operations in the secure world, the integrity and credibility of the virtual machine monitor at startup can be ensured to prevent the intrusion and tampering of malicious software.
[0036] The method of this embodiment is applied to a computer device that divides the normal world and the secure world through ARM TrustZone. The normal world serves as the REE side and the secure world serves as the TEE side. In this embodiment, the operating system REE OS running in the normal world is called a general operating system, and the operating system TEE OS running in the secure world is called a secure operating system.
[0037] Specifically, when the jailhouse is started based on authentication guidance on the common operating system in the common world and the secure operating system in the secure world, the following steps are included:
[0038] The steps to load the jailhouse driver are as follows: Figure 2 As shown, the following steps are included:
[0039] S101) The common world requests to load the jailhouse driver: When the jailhouse client application CA in the common operating system (such as Linux) of the common world needs to load the jailhouse driver, the secure operating system driver TEE driver in the common operating system sends a request to load the jailhouse driver to the secure operating system;
[0040] S102) Security operating system authentication: the security operating system authenticates the jailhouse driver after receiving the request;
[0041] S103) Authorization or not: Based on the authentication result, the secure operating system decides whether to allow the ordinary world to load the driver. If the authentication is successful, the secure operating system loads the jailhouse driver from the secure world where the secure operating system is located to the ordinary world where the universal operating system is located. If the authentication fails, the process ends and exits.
[0042] S104) Loading driver: After detecting the jailhouse driver loaded into the ordinary world, the jailhouse client application CA in the general operating system loads the jailhouse driver to complete the initialization operation of jailhouse startup.
[0043] After loading the jailhouse driver and completing the initialization operation of jailhouse startup, the steps of executing the command line program are also included, such as Figure 3 As shown, the following steps are included:
[0044] S201) The common world requests to execute a command line program: When the jailhouse client application CA in the general operating system needs to execute a command line program, a request to execute the command line program is sent to the secure operating system through the secure operating system driver TEE driver in the general operating system;
[0045] S202) Security operating system authentication: the security operating system authenticates the command line program after receiving the request;
[0046] S203) Authorization or not: Based on the authentication result, the secure operating system decides whether to allow the ordinary world to execute the command line program. If the authentication is successful, the secure operating system transfers the authentication result from the secure world where the secure operating system is located to the ordinary world where the general operating system is located; if the authentication fails, it ends and exits;
[0047] S204) Executing the command line program: After detecting the authentication result transmitted to the ordinary world, the jailhouse client application CA in the general operating system selects whether to execute the command line program according to the authentication result.
[0048] At this point, Jailhouse completes the startup and takes over the general operating system.
[0049] Each step is described in detail below.
[0050] In step S101 of this embodiment, the general operating system sends a request to the secure operating system to load the jailhouse driver program, including: the jailhouse client application CA in the general operating system executes and sends a request to the secure operating system to load the driver program through the security monitoring call SMC, so that the security monitoring calls the SMC to respond to the request to load the corresponding callback function.
[0051] In step S102 of this embodiment, the secure operating system authenticates the jailhouse driver after receiving the request, including: authenticating the jailhouse driver in the secure world through a callback function in the secure operating system.
[0052] Specifically, when this embodiment authenticates the jailhouse driver, it includes checking the integrity of the jailhouse driver and checking the credibility of the signature of the jailhouse driver's request. Only when the integrity check of the jailhouse driver passes and the credibility check of the signature of the jailhouse driver's request passes, the authentication is determined to be successful. Otherwise, it is determined to be an authentication failure.
[0053] In step S103 of this embodiment, when authentication fails, it also includes releasing the resources occupied when calling the callback function.
[0054] In step S201 of this embodiment, sending a request to execute a command line program to the security operating system through the general operating system includes: the jailhouse client application CA in the general operating system executes and sends a request to execute the command line program to the security operating system through the security monitoring call SMC, so that the security monitoring calls the SMC in response to the request to load the corresponding callback function.
[0055] In step S202 of this embodiment, the secure operating system authenticates the command line program after receiving the request, including: authenticating the command line program in the secure world through a callback function in the secure operating system.
[0056] Specifically, in this embodiment, when authenticating the command line program, it includes checking the signature credibility of the request to execute the command line program. If the signature credibility check of the request to execute the command line program passes, it is determined that the authentication is successful. At this time, the secure operating system returns control to the ordinary world to execute the command line program; otherwise, it is determined that the authentication has failed.
[0057] In step S203 of this embodiment, when authentication fails, it also includes releasing the resources occupied when calling the callback function.
[0058] In step S204 of this embodiment, selecting whether to execute the command line program according to the authentication result includes: if the authentication result is authentication passed, the jailhouse client application CA in the operating system executes the command line program according to the request in step S201, otherwise the jailhouse client application CA in the operating system does not execute the command line program.
[0059] Embodiment 2
[0060] This embodiment proposes a system for jailhouse startup based on authentication guidance, including a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the method for jailhouse startup based on authentication guidance described in the first embodiment.
[0061] This embodiment further proposes a computer-readable storage medium, in which a computer program or instruction is stored. The computer program or instruction is programmed or configured to execute the method of booting a jailhouse based on authentication described in the first embodiment through a processor.
[0062] This embodiment further proposes a computer program product, including a computer program or instructions, wherein the computer program or instructions are programmed or configured to execute the method of booting a jailhouse based on authentication described in the first embodiment through a processor.
[0063] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented 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. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0064] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for guiding jailhouse startup based on authentication, characterized in that: Applied to a computer device that divides a normal world and a secure world by ARM TrustZone, the method includes booting a jailhouse based on authentication on a computer device that includes a general operating system in the normal world and a secure operating system in the secure world: When the jailhouse client application CA in the general operating system needs to load the jailhouse driver, a request to load the jailhouse driver is sent to the secure operating system through the secure operating system driver TEE driver in the general operating system; The secure operating system authenticates the jailhouse driver after receiving the request; If the authentication is successful, the secure operating system will load the jailhouse driver from the secure world where the secure operating system is located to the ordinary world where the general operating system is located; if the authentication fails, it will end and exit; After detecting the jailhouse driver loaded into the ordinary world, the jailhouse client application CA in the general operating system loads the jailhouse driver to complete the initialization operation of jailhouse startup.
2. The method for booting a jailhouse based on authentication according to claim 1, characterized in that: The general operating system sends a request to load the jailhouse driver to the secure operating system, including: the jailhouse client application CA in the general operating system executes and sends a request to load the driver to the secure operating system through the security monitoring call SMC, so that the security monitoring calls the SMC to respond to the request to load the corresponding callback function.
3. The method for booting a jailhouse based on authentication according to claim 2, characterized in that: The secure operating system authenticates the jailhouse driver after receiving the request, including: authenticating the jailhouse driver in the secure world through a callback function in the secure operating system.
4. The method for booting a jailhouse based on authentication according to claim 3, characterized in that: When the authentication fails, the resource occupied by calling the callback function is released.
5. The method for booting a jailhouse based on authentication according to claim 1, characterized in that: After the jailhouse driver is loaded and the jailhouse startup initialization operation is completed, the following steps are further included: When the jailhouse client application CA in the general operating system needs to execute a command line program, a request to execute the command line program is sent to the secure operating system through the secure operating system driver TEE driver in the general operating system; The secure operating system authenticates the command line program after receiving the request; If the authentication is successful, the secure operating system will transfer the authentication result from the secure world where the secure operating system is located to the ordinary world where the general operating system is located; if the authentication fails, it will end and exit; After detecting the authentication result transmitted to the ordinary world, the jailhouse client application CA in the general operating system chooses whether to execute the command line program according to the authentication result.
6. The method for jailhouse startup based on authentication guidance according to claim 5, characterized in that: When authenticating the jailhouse driver, it includes checking the integrity of the jailhouse driver and checking the signature credibility of the jailhouse driver's request. Only when the integrity check of the jailhouse driver and the signature credibility check of the jailhouse driver's request pass, the authentication is determined to be successful, otherwise it is determined to be authentication failure; when authenticating the command line program, it includes checking the signature credibility of the request to execute the command line program. If the signature credibility check of the request to execute the command line program passes, the authentication is determined to be successful, otherwise it is determined to be authentication failure.
7. The method for booting a jailhouse based on authentication according to claim 5, characterized in that: The selecting whether to execute the command line program according to the authentication result includes: if the authentication result is authentication passed, the jailhouse client application CA in the operating system executes the command line program, otherwise the jailhouse client application CA in the operating system does not execute the command line program.
8. A system for booting a jailhouse based on authentication, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the method for booting a jailhouse based on authentication as recited in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the method for guiding jailhouse startup based on authentication as claimed in any one of claims 1 to 7 through a processor.
10. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the method for guiding jailhouse startup based on authentication as claimed in any one of claims 1 to 7 through a processor.
Citation Information
Patent Citations
Virtual machine monitor public key registration method, equipment and storage medium
CN113448681A
Construction method and device of trusted environment, computer equipment and storage medium
CN115859381A