An operating system security protection method, device and system
By combining the kernel protection module and TZASC, read-only permissions are set for operating system memory regions and page table entries. TrustZone technology is used to isolate memory resources, solving the problem of the operating system kernel being easily tampered with and achieving higher security and integrity protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2022-03-21
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, operating system kernels are easily tampered with, and software protection technologies rely on kernel self-protection, which has security vulnerabilities and makes it difficult to effectively protect the integrity of the operating system.
The kernel protection module obtains the addresses of memory regions and the base addresses of kernel page tables, instructs TZASC to set the access permissions of these regions to read-only for non-secure regions, and further parses the access permissions of kernel page table entries to ensure their read-only nature, thus using TrustZone technology to achieve memory and resource isolation.
It effectively prevents the operating system kernel from being tampered with, improves system security, and prevents attackers from damaging the system by tampering with kernel control.
Smart Images

Figure CN114637997B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer system security protection technology, and in particular to an operating system security protection method, device and system. Background Technology
[0002] With the rapid development of information technology and the continuous expansion of business demands, computer system design has become increasingly complex, leading to a continuous increase in the size of operating system code and posing a significant challenge to computer system security. As a core component of a computer system, the operating system kernel's security has become a key focus in ensuring computer system security. Therefore, the prerequisite for operating system security protection technologies to function effectively is a trustworthy operating system kernel, and the necessary condition for a trustworthy operating system kernel is its integrity.
[0003] In the process of implementing the integrity protection of the operating system kernel, a number of software-based protection technologies have been proposed and applied, but most of them have some defects. Since software protection technologies rely on the self-protection of the operating system kernel, as long as an attacker gains control of the kernel, he can tamper with the kernel and destroy the system's protection technology.
[0004] Therefore, how to prevent the operating system kernel from being tampered with is an urgent problem that needs to be solved. Summary of the Invention
[0005] This application provides an operating system security protection method, apparatus, and system to prevent the operating system kernel from being tampered with.
[0006] Firstly, an operating system security protection method is provided, including:
[0007] The kernel protection module obtains the address of the memory region to be protected and the base address of the kernel page table; the kernel protection module instructs TZASC to set the access permission of the memory region to be protected to read-only for non-secure regions based on the address of the memory region to be protected; the kernel protection module parses the kernel page table entry based on the base address of the kernel page table to obtain the kernel page table entry, and instructs TZASC to set the access permission of the kernel page table entry falling into the memory region to read-only for non-secure regions.
[0008] In one possible implementation, before the kernel protection module obtains the address of the memory region to be protected and the kernel page table base address, the method further includes:
[0009] The operating system kernel sends the address of the memory region to be protected and the base address of the kernel page table to the kernel protection module.
[0010] In one possible implementation, before the operating system kernel sends the address of the memory region to be protected and the kernel page table base address to the kernel protection module, the method further includes:
[0011] The operating system kernel is initialized, the address of the memory region to be protected is obtained, and the kernel page table base address is read from the page table base address register; wherein, the address of the memory region to be protected includes at least the physical memory address for storing the program code of the operating system kernel and the physical memory address for storing read-only data.
[0012] In one possible implementation, the operating system kernel sends the address of the memory region to be protected and the kernel page table base address to the kernel protection module, including:
[0013] The operating system kernel sends the address of the memory region to be protected and the kernel page table base address to the kernel protection module by calling the interface of the security monitoring module.
[0014] In one possible implementation, the kernel protection module parses the operating system kernel image file or kernel configuration file to obtain the address of the memory region to be protected, and reads the kernel page table base address from the page table base address register.
[0015] In one possible implementation, before the kernel protection module instructs the TZASC to set the access permission of the memory region to be protected to read-only for the non-secure region based on the address of the memory region to be protected, the module further includes:
[0016] The kernel protection module verifies the validity of the address of the memory region to be protected; the kernel protection module instructs the TZASC to set the access permission of the memory region to be protected to read-only for the non-secure region according to the address of the memory region to be protected, including: the kernel protection module instructs the TZASC to set the access permission of the memory region that has been verified as valid to read-only for the non-secure region according to the address of the memory region that has been verified as valid.
[0017] In one possible implementation, the kernel protection module runs in a secure region, while the operating system kernel runs in a non-secure region.
[0018] Secondly, an operating system security protection system is provided, comprising: an operating system kernel, the kernel protection module, and a TZASC; the kernel protection module is configured to obtain the address of a memory region to be protected and the base address of a kernel page table, and instruct the Trust Zone Address Space Controller (TZASC) to set the access permission of the memory region to be protected to non-secure region read-only according to the address of the memory region to be protected; and to parse kernel page table entries according to the base address of the kernel page table, and instruct the TZASC to set the access permission of kernel page table entries falling into the memory region to non-secure region read-only; the TZASC is configured to set the access permission of the memory region to be protected to non-secure region read-only according to the instruction of the kernel protection module; and to set the access permission of kernel page table entries falling into the memory region to non-secure region read-only.
[0019] In one possible implementation, the operating system kernel is used for:
[0020] The address of the memory region to be protected and the base address of the kernel page table are sent to the kernel protection module.
[0021] In one possible implementation, the operating system kernel is further configured to:
[0022] Initialization is performed to obtain the address of the memory region to be protected, and the kernel page table base address is read from the page table base address register; wherein, the address of the memory region to be protected includes at least the physical memory address used to store the program code of the operating system kernel and the physical memory address used to store read-only data.
[0023] In one possible implementation, the system further includes a security monitoring module; specifically, the operating system kernel is used to: send the address of the memory region to be protected and the kernel page table base address to the kernel protection module by calling the interface of the security monitoring module.
[0024] In one possible implementation, the kernel protection module is specifically used for:
[0025] The operating system kernel image file or kernel configuration file is parsed to obtain the address of the memory region that needs to be protected, and the kernel page table base address is read from the page table base address register.
[0026] In one possible implementation, the kernel protection module is further configured to:
[0027] Verify the validity of the address of the memory region that needs to be protected; and instruct the TZASC to set the access permission of the valid memory region to read-only for non-secure regions based on the address of the valid memory region.
[0028] In one possible implementation, the kernel protection module runs in a secure region, while the operating system kernel runs in a non-secure region.
[0029] Thirdly, a communication device is provided, comprising: a processor and a memory; the memory storing computer instructions; the processor being configured to read the computer instructions and execute the method as described in any of the first aspects.
[0030] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method as described in any of the first aspects.
[0031] Fifthly, a computer program product is provided, which, when invoked by a computer, causes the computer to perform the method as described in any of the first aspects.
[0032] Since the kernel protection module sends the address of the memory region requiring protection based on the operating system kernel's address, it instructs TZASC to set the access permissions of the protected memory region to read-only (non-secure region), thus achieving integrity protection for the operating system kernel. Furthermore, after resolving the kernel page table entry from the kernel page table base address, the kernel protection module instructs TZASC to also set the access permissions of kernel page table entries falling within the protected memory region to read-only (non-secure region), thereby preventing the operating system kernel from being tampered with and improving operating system security. Attached Figure Description
[0033] Figure 1 This is a diagram illustrating the TrustZone technical architecture applicable to the embodiments of this application.
[0034] Figure 2 This is a diagram of the operating system security protection system architecture applicable to the embodiments of this application;
[0035] Figure 3 This is a schematic flowchart of an operating system security protection method provided in an embodiment of this application;
[0036] Figure 4 This is a schematic diagram illustrating the initialization process of an operating system kernel provided in an embodiment of this application;
[0037] Figure 5 A schematic diagram of the structure of a communication device provided for the implementation of this application. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0039] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.
[0040] (1) In the embodiments of this application, the terms “network” and “system” are often used interchangeably, but those skilled in the art can understand their meaning.
[0041] (2) In the embodiments of this application, the term “multiple” refers to two or more, and other quantifiers are similar.
[0042] (3) "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A alone, A and B at the same time, and B alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship.
[0043] (4) TrustZone technology divides the ARM core logic into a secure core and a non-secure core. Through on-chip security modules such as the TrustZone Address Space Controller (TZASC), TrustZone Protection Controller (TZPC), and TrustZone Memory Adaptor (TZMA), it isolates memory, peripherals, and on-chip Static Random Access Memory (SRAM) into secure and non-secure resources for access by both the secure and non-secure cores. The secure core and secure resources together form the secure region, while the non-secure core and non-secure resources together form the non-secure region. During runtime, the non-secure and secure regions can be dynamically switched via instructions, and both are time-sharing multiplexed.
[0044] TZASC is typically integrated into the memory controller to divide memory into secure and insecure regions and supports access control. TZASC access permissions are represented by 4 bits, representing secure kernel read, secure kernel write, non-secure kernel read, and non-secure kernel write, for a total of 16 permissions. TZASC itself can only be accessed through the secure kernel, thus ensuring that access configurations cannot be tampered with.
[0045] TZPCs are typically integrated on the Advanced High Performance Bus (AHB) or the Advanced Peripheral Bus (APB) to control access permissions for peripherals (accessible via the security core or the non-security core). The TZPC itself can only be accessed through the security core, thus ensuring that the access configuration cannot be tampered with.
[0046] TZMA is used to control secure or non-secure kernel access permissions for on-chip read-only memory (ROM) or SRAM. TZMA itself can only be accessed through the secure kernel, thus ensuring that the access configuration cannot be tampered with.
[0047] Figure 1 This is a diagram of the TrustZone technology architecture applicable to the embodiments of this application. As shown in the figure, this architecture is mainly connected to a central processing unit (CPU) 11, a generic interrupt controller (GIC), a graphics processing unit (GPU), a neural network processing unit (NPU), TZASC 12, TZMA 13, TZP, and AXIBridges via a bus (e.g., AXI Bus) 10. The number of CPUs 11 can be multiple. Figure 1 Described using only one CPU.
[0048] CPU 11 is classified as a non-secure core (e.g., Figure 1 The NS (as shown in the figure) and the security core (as shown in the figure S) can be used to distinguish between accessing secure resources and non-secure resources.
[0049] TZASC 12 primarily controls Dynamic Random Access Memory (DRAM), which can divide memory into secure CPU core accessible areas and non-secure CPU core accessible areas, thereby achieving DRAM isolation.
[0050] The TZMA 13 is mainly used for internal random access memory (iRAM) and internal read-only memory (iRAM) in control systems. It can divide the memory (iRAM, iRAM) into safe and unsafe areas, thereby achieving isolation of the aforementioned memory.
[0051] TZPC is a peripheral controller that controls access permissions for peripherals, such as High Definition Multimedia Interface (HDMI), Universal Serial Bus (USB), etc.
[0052] GIC can distinguish between non-secure and secure interrupts and can manage interrupt control for CPU 11. AXIBridges can bridge the APB bus, enabling APB bus peripherals to support TrustZone security features in conjunction with TZPC. The system bus, as the infrastructure of TrustZone, provides an isolation mechanism between the secure and non-secure worlds, ensuring that non-secure kernels can only access system resources in the non-secure world, while secure kernels can access all resources. Therefore, resources in the secure world cannot be accessed by the non-secure world (or the normal world).
[0053] In this embodiment, TZASC 12, based on the aforementioned Trust Zone technology, is configured with memory access permissions to achieve security protection for the operating system kernel.
[0054] Figure 2 This is a schematic diagram of the operating system security protection system applicable to the embodiments of this application.
[0055] As shown in the figure, the system mainly includes an application program, an operating system kernel 20, a security monitoring module 21, a TZASC 12, and a kernel protection module 23. Among them, the security monitoring module 21, the kernel protection module 23, and the TZASC 12 run in the secure area, while the operating system kernel 20 runs in the insecure area.
[0056] The application runs in EL0 processor mode.
[0057] The operating system kernel 20 runs in the EL1 processor mode of the non-secure area, and can send the addresses that need to be protected to the kernel protection module 23 through the security monitoring module 21.
[0058] The security monitoring module 21 is a basic module in TrustZone technology. It runs in the EL3 processor mode of the security zone. It can send the received address to the kernel protection module 23, and can also be used to load and run the kernel protection module 23.
[0059] The kernel protection module 23 runs in the EL1 processor mode of the secure area. It can be used to obtain the address sent by the security monitoring module 21, and can also be used to directly parse the operating system kernel image file or kernel configuration file, read from the page table base address register, etc. to obtain the required address. It can also load the operating system kernel 20 into the non-secure area memory to run, and can also call TZASC 12 to set permission operations on the obtained address to realize the security protection of the operating system kernel 20.
[0060] It should be noted that the security of the above modules during the startup phase can be ensured through digital signature verification.
[0061] Figure 3 This is a schematic flowchart of an operating system security protection method provided in an embodiment of this application. This process can be handled by a kernel protection module (such as...). Figure 2 The kernel protection module 23) is executed by this module. This module can be implemented in software, hardware, or a combination of both. As shown in the figure, the process includes the following steps:
[0062] 301: The kernel protection module obtains the address of the memory region that needs to be protected and the base address of the kernel page table.
[0063] Optionally, the address of the memory region that needs to be protected may include the physical memory address used to store the program code of the operating system kernel, the physical memory address used to store read-only data, and may also include any other range of memory addresses that need to be read-only protected. This application embodiment does not limit this.
[0064] Optionally, in some embodiments, during system initialization, the operating system kernel sends the addresses of the memory regions to be protected and the base addresses of the kernel page tables to the kernel protection module. For example,... Figure 4 As shown, before the kernel protection module obtains the address of the memory region to be protected and the base address of the kernel page table sent by the operating system kernel, the operating system kernel performs initialization. The initialization process of the operating system kernel is as follows:
[0065] 401: The operating system kernel is being initialized.
[0066] 402: After the operating system kernel initializes, it obtains the address of the memory region that needs to be protected and reads the kernel page table base address from the page table base address register.
[0067] 403: The operating system kernel sends the address of the memory region to be protected and the kernel page table base address to the kernel protection module. Optionally, the operating system kernel can obtain the address and range of the text and rodata segments, and can also read the kernel page table base address from the page table base address register, etc., and send them to the kernel protection module.
[0068] Optionally, the operating system kernel can send the address of the memory region to be protected and the base address of the kernel page table to the kernel protection module by calling the interface of the security monitoring module. Afterward, the operating system kernel will process the data in the original manner.
[0069] The operating system kernel can be initialized without modification, thereby reducing the consumption of system resources.
[0070] Optionally, in other embodiments, the kernel protection module may also directly parse the operating system kernel image file or kernel configuration file to obtain the address of the memory region to be protected, and read the kernel page table base address from the page table base address register, which can also avoid modifying the operating system kernel.
[0071] 302: The kernel protection module instructs TZASC to set the access permissions of the memory region to be protected to read-only for the non-secure region, based on the address of the memory region to be protected.
[0072] Optionally, before instructing TZASC to set the access permission of the memory region to be protected to read-only (non-secure region) based on its address, the kernel protection module can also verify the validity of the address of the memory region to be protected. When the address of the memory region to be protected is verified as a valid memory region address, the kernel protection module instructs TZASC to set the access permission of the valid memory region to read-only (non-secure region). For example, the address of the memory region to be protected can be verified based on the physical memory range threshold of the region. If the address range of the memory region to be protected does not exceed the physical memory range threshold, then the address of the memory region to be protected is determined to be valid, and the access permission of the memory region is set to read-only (non-secure region).
[0073] By setting the access permissions of memory regions that need protection to read-only in non-secure regions using TZASC, there is no need to switch between secure and non-secure regions or perform dynamic measurements. Furthermore, setting access permissions based on TZASC has a minimal impact on memory bandwidth and latency, thereby saving operating system resources.
[0074] 303: The kernel protection module resolves the kernel page table entry based on the kernel page table base address and instructs TZASC to set the access permission of the kernel page table entry falling into the memory region that needs to be protected to read-only for the non-secure region.
[0075] In this step, it is only necessary to instruct TZASC to set the access permissions of kernel page table entries that fall into the memory region that needs to be protected to read-only in the non-secure region. Compared to switching the kernel page table entries to be executed in the secure region, this requires less modification to the operating system, thereby reducing the consumption of operating system resources.
[0076] In this embodiment, since the kernel protection module instructs TZASC to set the access permissions of the memory region to be protected to read-only (non-secure region) based on the address of the memory region to be protected sent by the operating system kernel, the integrity protection of the operating system kernel is achieved. Furthermore, after resolving the kernel page table entry based on the kernel page table base address, the module instructs TZASC to also set the access permissions of the kernel page table entries falling into the memory region to read-only (non-secure region), thereby preventing the operating system kernel from being tampered with and improving the security of the operating system.
[0077] In this embodiment, since the non-secure region has no right to modify TZASC, even if an attacker gains access to the operating system kernel, they cannot tamper with the operating system kernel, thus achieving integrity protection of the operating system kernel. Since the access permissions of kernel page table entries falling into the memory region that needs protection are also set to read-only in the non-secure region, the attacker cannot tamper with the operating system kernel by modifying the page table entries to point to another physical memory address. And TZASC controls the access permissions of the aforementioned physical memory addresses, thereby protecting the security of the operating system.
[0078] Based on the same technical concept, this application also provides an apparatus that can implement the above-described method flow for operating system security protection in this application.
[0079] Figure 5 This is a schematic diagram of the structure of the communication device provided in the embodiments of this application.
[0080] As shown in the figure, the device may include: a processor 501, a memory 502, and a bus interface 503.
[0081] The processor 501 is responsible for managing the bus architecture and general processing, while the memory 502 can store the data used by the processor 501 when performing operations.
[0082] The bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 501) and memory (memory 502). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides the interface. Processor 501 is responsible for managing the bus architecture and general processing, and memory 502 can store data used by processor 501 during operation.
[0083] The processes disclosed in this application can be applied to or implemented by processor 501. During implementation, each step of the signal processing flow can be completed by integrated logic circuits in the hardware of processor 501 or by instructions in software form. Processor 501 can be a general-purpose processor, digital signal processor, application-specific integrated circuit, field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods claimed in the embodiments of this application can be directly embodied in the execution by the hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 502, and processor 501 reads the information in memory 502 and, in conjunction with its hardware, completes the steps of the information processing flow.
[0084] Specifically, the processor 501 is used to read computer instructions from the memory 502 and execute an operating system security protection method according to an embodiment of this application.
[0085] It should be noted that the communication device provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0086] This application also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute an operating system security protection method described in the above embodiments.
[0087] This application also provides a computer program product, which, when invoked by a computer, causes the computer to execute an operating system security protection method described in the above embodiments.
[0088] 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-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0089] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should 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, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0090] These 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 function 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 function specified in one or more boxes.
[0091] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment 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.
[0092] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for protecting the security of an operating system, characterized in that, include: The kernel protection module obtains the address of the memory region to be protected and the base address of the kernel page table; The kernel protection module instructs the Trust Zone Address Space Controller (TZASC) to set the access permissions of the memory region to be protected to read-only for the non-secure region, based on the address of the memory region to be protected. The kernel protection module resolves the kernel page table entry based on the kernel page table base address and instructs the TZASC to set the access permission of the kernel page table entry falling into the memory region to be protected to read-only in the non-secure region. Before the kernel protection module obtains the address of the memory region to be protected and the base address of the kernel page table, the method further includes: The operating system kernel is initialized, the address of the memory region to be protected is obtained, and the kernel page table base address is read from the page table base address register; wherein, the address of the memory region to be protected includes at least the physical memory address for storing the program code of the operating system kernel and the physical memory address for storing read-only data; The operating system kernel sends the address of the memory region to be protected and the base address of the kernel page table to the kernel protection module.
2. The method as described in claim 1, characterized in that, The operating system kernel sends the address of the memory region to be protected and the kernel page table base address to the kernel protection module, including: The operating system kernel sends the address of the memory region to be protected and the kernel page table base address to the kernel protection module by calling the interface of the security monitoring module.
3. The method as described in claim 1, characterized in that, The kernel protection module obtains the address of the memory region to be protected and the base address of the kernel page table, including: The kernel protection module parses the operating system kernel image file or kernel configuration file to obtain the address of the memory region to be protected, and reads the kernel page table base address from the page table base address register.
4. The method as described in claim 1, characterized in that, Before the kernel protection module instructs TZASC to set the access permission of the memory region to be protected to read-only for the non-secure region based on the address of the memory region to be protected, the following steps are also included: The kernel protection module verifies the validity of the address of the memory region that needs to be protected; The kernel protection module instructs TZASC to set the access permissions of the memory region to be protected to read-only for non-secure regions, based on the address of the memory region to be protected, including: The kernel protection module instructs TZASC to set the access permissions of the valid memory region to read-only for non-secure regions based on the address of the valid memory region.
5. The method according to any one of claims 1-4, characterized in that, The kernel protection module runs in the secure region, while the operating system kernel runs in the insecure region.
6. An operating system security protection system, characterized in that, include: Operating system kernel, kernel protection module, and Trust Zone Address Space Controller (TZASC); The kernel protection module is used to obtain the address of the memory region to be protected and the base address of the kernel page table, and instruct the Trust Zone Address Space Controller (TZASC) to set the access permission of the memory region to be protected to read-only in the non-secure zone according to the address of the memory region to be protected. Furthermore, based on the kernel page table base address, the kernel page table entry is resolved, and the TZASC is instructed to set the access permission of the kernel page table entry falling into the memory region to be protected to read-only in the non-secure region. The TZASC is used to set the access permissions of the memory region to be protected to read-only for the non-secure region, according to the instructions of the kernel protection module. And set the access permissions of kernel page table entries falling into the memory region that needs to be protected to read-only for non-secure regions; The operating system kernel is also used for: Initialization is performed to obtain the address of the memory region to be protected, and the kernel page table base address is read from the page table base address register; wherein, the address of the memory region to be protected includes at least the physical memory address used to store the program code of the operating system kernel and the physical memory address used to store read-only data; The address of the memory region to be protected and the base address of the kernel page table are sent to the kernel protection module.
7. The system as described in claim 6, characterized in that, The system also includes a security monitoring module; Specifically, the operating system kernel is used to: send the address of the memory region to be protected and the kernel page table base address to the kernel protection module by calling the interface of the security monitoring module.
8. The system as described in claim 6, characterized in that, The kernel protection module is specifically used for: The operating system kernel image file or kernel configuration file is parsed to obtain the address of the memory region that needs to be protected, and the kernel page table base address is read from the page table base address register.
9. The system as described in claim 6, characterized in that, The kernel protection module is also used for: Verify the validity of the address of the memory region that needs to be protected; and instruct the TZASC to set the access permission of the valid memory region to read-only for non-secure regions based on the address of the valid memory region.
10. The system according to any one of claims 6-9, characterized in that, The kernel protection module runs in the secure region, while the operating system kernel runs in the insecure region.
11. A communication device, characterized in that, include: Processor, memory; The memory stores computer instructions; The processor is configured to read the computer instructions and execute the method as described in any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method as described in any one of claims 1-5.
13. A computer program product, characterized in that, When the computer program product is invoked by a computer, it causes the computer to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Computer system trust root construction method with memory integrity guarantee function based on trusted execution environment
CN108154032A