Equipment trusted startup method and system, equipment and storage medium
By receiving hot start instructions in the trusted software base agent and sending a reset signal to the TPCM module, the problem of incomplete BIOS measurement during hot start is solved, and the complete trusted startup of the device during hot start is achieved, reducing the cost and technical difficulty.
Patent Information
- Application Number
- CN202411905560.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-29
AI Technical Summary
During hot startup, the TPCM module cannot receive the reset signal, resulting in incomplete BIOS measurement and missing a startup trust chain, resulting in startup exceptions. Existing solutions are made through hardware transformation and monitoring measures, but are costly and technically difficult.
The trusted software base agent receives hot start instructions, uses the hot start instructions to find the corresponding event type from the restart notification chain, call the event type callback function, send a reset signal to the TPCM module, switch the TPCM module to the main mode, and perform a complete startup measurement operation.
It realizes effective measurement of the BIOS when the device is hot-started, ensures the integrity of the startup trust chain, reduces technical difficulty and cost, and improves the security and stability of the device.
Smart Images

Figure CN119903522A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a device trusted startup method, system, device and storage medium. Background Art
[0002] For embedded devices based on TPCM (Trusted Platform Control Module), the reset and startup states of the system are divided into cold start state and hot start state. When the system enters the cold start state by powering off and restarting, the TPCM module can actively verify the BIOS (Basic Input Output System) before the underlying firmware is powered on and started, and can complete the trusted verification of key components and the trusted verification of the startup trust chain; however, when the hot start mode is entered through the system command reboot (restart), the device usually has a trusted root communication abnormality, that is, after the system restarts, the TPCM module does not receive the reset signal, and the TPCM module can only measure other key data such as the kernel, not the BIOS, the measurement stage is incomplete, there is no complete startup trust chain, and the startup is abnormal. At present, it can be solved through hardware modification and monitoring measures, but this brings high costs and technical implementation difficulties.
[0003] Therefore, how to achieve effective measurement of BIOS during hot boot of a device in a low-cost and low-difficulty manner is a problem that those skilled in the art need to solve. Summary of the invention
[0004] The present application provides a device trusted boot method, system, device and storage medium, so as to achieve effective measurement of BIOS during hot boot of the device in a low-cost and low-difficulty manner.
[0005] In a first aspect, the present application provides a device trusted startup method, the method is based on a trusted software base agent, and the method includes:
[0006] Receive hot start command;
[0007] Using the hot start instruction, searching for a corresponding event type from the restart notification chain;
[0008] The callback function of the event type is called, and a reset signal is sent to the TPCM module through the callback function, so that the TPCM module switches the mode to the main mode through the reset signal and performs a complete startup measurement operation on the device.
[0009] Optionally, before receiving the hot start notification, the method further includes:
[0010] Determine the event type and callback function to be registered;
[0011] Register the event type and the callback function to the restart notification chain.
[0012] Optionally, using the hot start instruction, searching for a corresponding event type from the restart notification chain includes:
[0013] If the hot start instruction is a reboot command, the system restart event type is searched from the restart notification chain; the system restart event type includes SYS_DOWN and SYS_RESTART.
[0014] Optionally, using the hot start instruction, searching for a corresponding event type from the restart notification chain includes:
[0015] If the hot start instruction is a shutdown command, the corresponding system suspend event type is searched from the restart notification chain; the system suspend event type is SYS_HALT.
[0016] Optionally, sending a reset signal to the TPCM module through the callback function includes:
[0017] The callback function uses the TPCM communication driver to send the reset information to the TPCM module.
[0018] In a second aspect, the present application provides a device trusted startup method, the method is based on a TPCM module, and the method includes:
[0019] Receiving a reset signal sent by a trusted software base agent; the reset signal is sent to the TPCM module by the trusted software base agent using a hot start instruction to search for a corresponding event type from a restart notification chain, calling a callback function of the event type, and sending the reset signal to the TPCM module through the callback function;
[0020] Using the reset signal to switch the mode to the main mode;
[0021] Perform a full boot measurement operation on the device.
[0022] Optionally, perform a full boot measurement operation on the device, including:
[0023] The BIOS, kernel and application of the device are measured in sequence to obtain the measurement results.
[0024] In a third aspect, the present application provides a device trusted startup system, including:
[0025] A trusted software base agent, configured to receive a hot start instruction, use the hot start instruction to search for a corresponding event type from a restart notification chain, call a callback function of the event type, and send a reset signal to the TPCM module through the callback function;
[0026] The TPCM module is used to receive the reset signal, use the reset signal to switch the mode to the main mode, and perform a complete startup measurement operation on the device.
[0027] In a fourth aspect, the present application further provides an electronic device, including:
[0028] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the above-mentioned device trusted startup method of the present application through the computer program.
[0029] In a fifth aspect, the present application also provides a computer storage medium, which stores computer executable instructions, and the computer executable instructions are used to execute the steps of the above-mentioned device trusted startup method of the present application.
[0030] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the present application discloses a device trusted startup solution, in which a trusted software base agent receives a hot startup instruction, and uses the hot startup instruction to search for a corresponding event type from a restart notification chain; calls a callback function of the event type, and sends a reset signal to the TPCM module through the callback function, so that the TPCM module switches the mode to the main mode through the reset signal, and performs a complete startup measurement operation on the device; it can be seen that in the present application, after receiving the hot startup instruction, the trusted software base agent sends a reset signal to the TPCM module through the kernel notification chain mechanism, so as to perform a complete startup measurement operation including a trusted measurement of the BIOS. This method does not require hardware modification, and can effectively measure the BIOS when the device is hot started, thereby reducing technical difficulty and cost, and improving device security. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0033] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0034] Figure 1 A cold start flow chart provided in an embodiment of the present application;
[0035] Figure 2 A hot start flow chart of a traditional solution provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of a device trusted startup method flow chart provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the structure of a trusted software base agent provided in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of the system structure provided in the embodiment of the present application;
[0039] Figure 6 A specific device trusted startup method flow chart provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of the structure of a device trusted startup device provided in an embodiment of the present application;
[0041] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] Trusted computing is a multi-level, cross-domain security technology system that ensures the integrity and reliability of the system by implementing a series of security checks during the computer startup and operation process, and through a series of verification and control mechanisms based on the trusted root. The core of trusted computing is the trusted root, which is the starting point for establishing a trust chain.
[0043] During the computer system startup process, trusted computing is an important concept to ensure the security of system startup. Trusted startup is an important part of trusted computing. Based on the dual architecture of trusted computing, the TPCM module can actively verify the BIOS before the underlying firmware is powered on, and perform signature verification on key components (such as BIOS, Bootloader, operating system, etc.) when the computer starts. Trusted verification is performed through trusted metrics to ensure that these components have not been tampered with, forming a complete startup trust chain to ensure the security and integrity of the system. Compared with traditional protection measures, embedded devices based on TPCM modules have the ability of active immunity, realize active defense, and can provide stronger security, management and control capabilities. They have been applied in many fields.
[0044] At present, when the device enters hot boot mode through system command reboot, the device usually has abnormal trusted root communication. This phenomenon will cause the TPCM module to fail to receive the reset signal. The TPCM module can only measure key data such as the kernel, but not the BIOS. The measurement stage is incomplete, there is no complete startup trust chain, and the startup is abnormal. This problem causes a series of problems such as security, stability, management and maintenance, and has a great impact, such as:
[0045] The failure of the TPCM module to start normally means that the security protection mechanism of the device may not be effectively established, and the sensitive data in the device is more vulnerable to external attacks and theft. Without the security verification of the TPCM module, malware may be more easily installed and run on the device, further threatening data security.
[0046] The root of trust usually plays a key role in the identity authentication process. If the TPCM module is started abnormally, the device may not be able to correctly verify the user's identity, allowing unauthorized users to access device resources. This may cause serious security risks, especially in scenarios with high security requirements, such as financial transactions and internal corporate network access. For systems that require multi-factor authentication, the abnormality of the root of trust may cause the entire authentication chain to break, greatly reducing the security of the device.
[0047] Abnormal communication with the trusted root may cause errors during system startup, which may lead to system crash or freeze. This will seriously affect the normal use of the device, especially in some mission-critical scenarios, which may cause business interruption and huge economic losses.
[0048] Many software rely on the secure environment provided by the root of trust to run properly. When the root of trust is abnormally started, these software may have various errors, such as failure to load, slow operation, and functional failure. For example, some encryption software may not be able to encrypt and decrypt data normally, affecting the security of data transmission and storage.
[0049] Since abnormal trusted root startup may lead to uncertain security status of the device, the management difficulty will be greatly increased for large-scale embedded devices. And if the trusted root startup is abnormal, it may affect the update and upgrade process of the device, resulting in the inability to install and run new software correctly. This will limit the function expansion and performance improvement of the device, affecting the long-term use value of the device.
[0050] To solve the above problems, the existing technology provides solutions to the problems to a certain extent. The existing technology usually transforms the computer motherboard startup mode, through hardware module transformation, through the manipulation of hardware circuits, or through third-party monitoring modules, etc. to ensure that the BIOS can be measured when the system restarts. The existing transformation technology and several variations and improvement methods are highly comprehensive and complex work, involving not only the hardware itself but also software, system integration, testing and other links. The technical difficulty is high and the implementation difficulty is increased. The potential hardware transformation cost and technical difficulty of the existing technical method cannot be ignored.
[0051] Existing technologies for modifying the way a computer motherboard boots up may involve in-depth manipulation of the hardware circuit, which often leads to compatibility issues between the modified system and the original hardware or software. In particular, when embedded devices are used in different scenarios, the diversity of hardware may make it difficult for the modification solution to be universally applicable. The modified system may suffer from reduced system stability due to the mismatch between hardware and software. During the hot boot process, the system may fail to boot normally or crash frequently due to abnormal trusted root communication or incomplete measurement phase.
[0052] As technology continues to develop, the hardware and software of embedded devices are constantly being updated. However, existing technologies may not be able to keep up with the pace of this update, resulting in problems when applied to new devices. For example, new hardware may not support existing transformation methods, and existing technologies have the problem of lagging behind in technology updates. In addition, existing technologies are often designed for specific hardware, so they may not be able to cope with different needs or expand functions. For example, when it is necessary to add new security features or performance optimization to embedded devices, existing technologies may not provide sufficient flexibility and scalability.
[0053] Embedded devices based on TPCM modules are suitable for various fields, especially key infrastructure fields such as the Internet of Things, automobiles, electronics, industry, aerospace, national defense, energy, medical care, and communications. These key fields require the system to have higher stability, real-time, and stronger security. In view of the application characteristics of the equipment, the existing technology has defects such as system compatibility and stability issues, security risks, and implementation and maintenance difficulties. There is no unified standard and specification for the transformation technology for the hot start problem of embedded devices based on TPCM modules. This makes the solutions between different manufacturers or different projects different, making it difficult to manage and optimize them uniformly.
[0054] In summary, existing technologies solve these problems through complex hardware transformation and monitoring measures, but this brings high costs and technical implementation difficulties. Especially in the field of critical infrastructure, the limitations of these solutions are particularly prominent. Therefore, it is particularly urgent to explore a low-cost, low-tech solution. In future research and practice, it is necessary to explore new solutions and technical means more deeply, and strengthen standardization and normalization work to overcome these defects and improve the overall performance and security of the system. At the same time, it is also necessary to pay attention to issues such as the speed of technology updates, scalability, difficulty in debugging and testing, and long-term support.
[0055] Therefore, in the embodiments of the present application, a device trusted boot method, system, device and storage medium are disclosed to achieve effective measurement of the BIOS during hot boot of the device in a low-cost and low-difficulty manner.
[0056] Before explaining this application, the relevant terms in this application are explained first:
[0057] TPCM: Trusted Platform Control Module, a hardware core module integrated in the trusted computing platform, used to establish and protect the trust source point, providing integrity measurement, secure storage, trusted reporting, and cryptographic services for trusted computing.
[0058] BIOS: It is a set of programs fixed on a ROM (Read-Only Memory) chip on the computer's motherboard. It stores the most important basic input and output programs, system setting information, self-test programs after powering on, and system startup programs. Its main function is to provide the lowest-level and most direct hardware settings and controls for the computer.
[0059] FLASH: Flash memory is a form of electrically erasable programmable read-only memory that can be erased or written multiple times during operation. Flash memory is used in computer BIOS, memory cards of digital cameras, etc.
[0060] Trusted Software Base Agent: Located in the computing component, it mainly acts as an agent for the protection component in the computing environment, relying on the trusted root to establish immunity and provide security protection functions for systems and applications on general computing platforms.
[0061] Notification chain: Notification chain is a basic component of the Linux (operating system) kernel. Kernel components can register kernel events (for example, rebooting the system). When the registered event occurs, the callback function originally registered by these components will be called.
[0062] Notification chain implementation mechanism: The kernel forms a linked list of nodes of the same type of events that are registered. When a specific kernel event occurs, the kernel component to which the event belongs is responsible for traversing all nodes on the notification chain, finding the node corresponding to this event, and calling the callback function registered on the node.
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0064] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0065] It should be noted that this application can not only perform complete trusted boot for embedded devices, but also perform complete trusted boot for other devices. Here, only embedded devices are used as an example for explanation. Currently, embedded devices based on TPCM modules can reliably switch between different working modes, including master mode and slave mode. Figure 1 , is a cold start flow chart provided by an embodiment of the present application. When a cold start is performed to reset and start, the power signal of the TPCM module in the startup phase takes precedence over the startup of the embedded device main control chip. Therefore, during a cold start, after the TPCM module is powered on, the initial mode is the master mode. The TPCM module reads the BIOS data in the flash and measures the BIOS. If the BIOS is successfully measured, the power control pin of the embedded device main control chip is pulled to a high level, and the power circuit of the embedded device main control chip is controlled to supply power to the embedded device main control chip. The main control chip is in the master mode, and the TPCM module is switched to the slave mode to measure key data such as the kernel. After the measurement is completed, the system starts normally, and the system implements the trusted startup of the TPCM module->BIOS->main control chip->kernel->application. After that, the TPCM module is always in the slave mode during the operation of the system.
[0066] See also Figure 2, which is a hot start flowchart of a traditional solution provided in an embodiment of the present application. It can be seen that when entering hot start through the system command reboot (hot start instruction), the TPCM module cannot receive the reset signal and is still in slave mode and cannot switch to master mode. Therefore, it cannot read the BIOS data in the flash and cannot complete the BIOS measurement; the main control chip restarts, and the TPCM module can only measure key data such as the kernel. The measurement stage is incomplete, there is no complete startup trust chain, and the measurement order is TPCM module->kernel->application, and it is impossible to confirm that the startup is safe. Therefore, in this application, in response to the abnormal problems during hot start, a device trusted startup solution provided by this application is used. This solution designs a mechanism for synchronizing with the TPCM state in the trusted software base agent kernel driver module. The TPCM module will receive the restart notification in time, complete the switching between the master mode and the slave mode in time, complete the measurement of all measurement stages, and the system starts normally.
[0067] See also Figure 3 , is a flow chart of a device trusted startup method provided by an embodiment of the present application, the method is based on a trusted software base agent, and the method includes the following steps:
[0068] S101, receiving a hot start instruction;
[0069] In this application, the device trusted startup method is implemented based on a trusted software base agent. The trusted software base agent is designed in accordance with the trusted system architecture specified by the national trusted computing standards, deployed at the operating system layer, and automatically starts with the system startup. In the dual system architecture, it is located in the computing component and mainly acts as an agent of the protection component in the computing environment. It relies on the trusted root to establish immunity and provide security protection functions for systems and applications for general computing platforms. Figure 4 , is a schematic diagram of the structure of the trusted software base agent provided in the embodiment of the present application. It can be seen from the figure that the trusted software base agent mainly includes an application service module and a kernel driver module. The main tasks of the trusted software base agent include intercepting system behavior, obtaining behavior and environmental data, assisting in execution control, establishing management-side communication, establishing communication with the TPCM module, etc. The trusted software base agent provides support for the system operation at the operating system layer and the safe operation of applications, which can ensure the security of the protection mechanism itself and block known and unknown malicious code threats. It supports users to achieve higher levels of security requirements through policies in more complex scenarios.
[0070] Among them, the application service module mainly performs policy issuance and execution feedback, system initialization scanning, verification of the legitimacy of system signatures, reading and writing of kernel audit logs, etc. The kernel driver module is mainly responsible for security checks on key data in the kernel, and makes judgments and controls based on the inspection results. In this application, a communication module is set in the kernel driver module, and the module is specifically used to execute this solution. The communication module adopts the linux-kernel notification chain mechanism and registers the restart notification chain. When a hot start occurs, it sends a reset signal to the TPCM module through the callback function of the hot start notification, which can realize the communication between the TPCM module and the trusted software base agent. In this application, the hot start instruction is an instruction to trigger the hot start of the device. The type of instruction is not specifically limited here, as long as the hot start can be realized.
[0071] S102, using the hot start instruction, searching for the corresponding event type from the restart notification chain;
[0072] In the present application, after receiving a hot start instruction, the corresponding event type will be searched from the restart notification chain according to the hot start instruction. For example, if the hot start instruction is a reboot instruction, the corresponding event type searched from the restart notification chain is: system restart event type.
[0073] S103: Call the callback function of the event type, and send a reset signal to the TPCM module through the callback function, so that the TPCM module switches the mode to the main mode through the reset signal, and performs a complete startup measurement operation on the device.
[0074] Among them, after determining the event type corresponding to the hot start instruction, the callback function of the event type can be called, and a reset signal is sent to the TPCM module through the callback function, so that the TPCM module switches the mode to the main mode through the reset signal, and performs a complete startup measurement operation on the device. In this application, the complete startup measurement operation is to perform trustworthy measurement on the BIOS, kernel and application of the device in sequence, obtain the measurement results, and perform corresponding operations according to the measurement results.
[0075] See also Figure 5 , is a schematic diagram of the system structure provided in the embodiment of the present application, through Figure 5 It can be seen that the protection components of the system include the TPCM module, and the computing components include the trusted software base agent, the TPCM communication driver, the BIOS firmware and hardware, etc. In the present application, when the communication module in the trusted software base agent kernel driver module sends a reset signal to the TPCM module through a callback function, the callback function specifically sends the reset information to the TPCM module through the TPCM communication driver.
[0076] In summary, this application aims at the problem of abnormal hot start of devices based on the TPCM module. Through the communication module in the kernel driver module of the trusted software base agent, a reset signal is sent to the TPCM module to solve the problem that the TPCM module does not measure the BIOS after the system is hot started. For devices that deploy a trusted software base agent, the trusted software base agent will start automatically as the system starts, and the kernel driver module will automatically load as the system is powered on; when the system is hot started, the kernel driver module completes the sending of the TPCM module reset signal through the callback function of the hot start notification; when the TPCM module receives the reset signal, it can switch back to the main mode to read the BIOS data in the flash and complete the BIOS measurement, thereby solving the problem of missing the BIOS measurement stage.
[0077] Moreover, the present application is solved by pure software, which is more convenient and less costly. The reset signal of the TPCM module is sent through the callback function of the hot start notification. After the system is hot started, the TPCM module is also restarted, and the system can start normally and perform startup measurement normally. The startup trust chain is complete, and there is no need to modify the TPCM module, the motherboard, or the hardware module. There is no need to modify the power system, hardware circuit and other modules, which reduces the cost and technical difficulty of hardware modification and directly reduces the initial investment and maintenance costs of the enterprise. The pure software modification does not involve hardware and is compatible with different devices in different scenarios, especially existing stock devices. The difficulty of modification is reduced, and the compatibility and system stability are high.
[0078] The pure software approach is more flexible and can be dynamically configured and optimized according to actual needs to meet the needs of different scenarios. At the same time, it can improve configurability and scalability, and can more easily adapt to future expansion needs. It can improve the reliability and efficiency of the system, reduce production and service interruptions caused by failures or hardware modifications and replacements, and improve user experience and overall social operating efficiency. This solution has advantages in forming unified standards and specifications and unified management through standardized interface protocols, simplified technical integration, centralized management, and improved system performance. The trusted software base agent relies on the trusted root to establish immunity, and provides support for the system operation and application security operation of the operating system layer based on the TPCM module, providing a more powerful security guarantee for the system.
[0079] In another embodiment of the present application, before receiving the hot start notification, it is also necessary to determine the event type and callback function to be registered, and register the event type and callback function to the restart notification chain.
[0080] Before implementing this application, you first need to register a reboot notification chain based on the event type and callback function. The kernel will form a linked list of nodes of the same type of event that are registered. When a specific kernel event occurs, the kernel component to which the event belongs is responsible for traversing all nodes on the notification chain, finding the node corresponding to this event, and calling the callback function registered on the node. In this embodiment, the reboot notification chain is called the reboot notification chain, and the callback function is used.
[0081] blocking_notifier_chain_register() adds the event notification node to a kernel linked list managed by module_notify_list. When adding the node corresponding to a new event to a notification chain, the system will use the priority of each node as a sorting keyword for simple sorting. The node with higher priority is closer to the head node. When an event occurs in this traversal list, it will be traversed first and notified first. Among them, blocking_notifier_chain_register() is a function in the Linux kernel, which is used to register a notification chain processing function; module_notify_list is one of many kernel notification chains. When a specific kernel event occurs, the kernel component to which the event belongs is responsible for traversing all nodes of the notification chain and calling the callback function on the node.
[0082] Among them, the reboot kernel notification chain node is:
[0083]
[0084]
[0085] In this application, the process of registering the reboot notification chain is as follows:
[0086] struct notifier_block reboot_event;
[0087] reboot_event.notifier_call = my_callback_func; / / Specific callback function, which will be called when the registered event occurs
[0088] reboot_event.priority = 0; / / Set priority
[0089] register_reboot_notifier(&reboot_event); / / Register to the reboot notification chain.
[0090] In another embodiment of the present application, a hot start instruction is used to search the corresponding event type from the restart notification chain, including: if the hot start instruction is a reboot command, then the system restart event type is searched from the restart notification chain; the system restart event type includes SYS_DOWN and SYS_RESTART; if the hot start instruction is a shutdown command, then the corresponding system suspend event type is searched from the restart notification chain; the system suspend event type is SYS_HALT.
[0091] In this application, the supported registration event types are as follows:
[0092] #define SYS_DOWN 0x0001 / *Notify of system down* /
[0093] #define SYS_RESTART SYS_DOWN
[0094] #define SYS_HALT 0x0002 / *Notify of system halt* / SYS_DOWN and SYS_RESTART are system restart event types. The commands supported by this event type can be reboot commands. SYS_HALT is a system suspend event type. The commands supported by this event type can be shutdown commands, such as shutdown-rnow, shutdown–h, etc.
[0095] See also Figure 6 , which is a specific device trusted boot method flow chart provided by an embodiment of the present application. In this embodiment, when the system is running, after the user enters the reboot command, a reboot notification will be sent to the trusted software base agent. The communication module in the kernel driver module of the trusted software base agent has registered a callback function for the reboot notification. When a reboot is detected, it sends a reset signal to the TPCM module through the callback function of the reboot notification to realize the communication between the TPCM module and the trusted software base agent. After the TPCM module receives the reset signal, the TPCM module re-enters the main mode, completes the switch, successfully reads the BIOS data in the flash, and completes the BIOS measurement. If the measurement result is a failure, the startup is stopped; if the measurement result is a success, the main control chip power control pin is pulled to a high level, the main control chip power circuit is controlled to power the main control chip, the main control chip is in the master mode, the TPCM module is switched to the slave mode, and the kernel and other key data are measured. After the measurement is completed, the system starts normally, so that the system can realize the complete trusted startup of TPCM module->BIOS->main control chip->kernel->application.
[0096] In summary, this application has at least the following beneficial effects:
[0097] 1. Pure software approach is less difficult: Different from existing hardware-based technical solutions, this application is a software approach under the operating system layer, which does not require hardware changes or collaboration among multiple parties, and has low technical difficulty.
[0098] 2. Lower overall cost: Pure software approach reduces the cost of solving problems and has lower maintenance costs. In the long run, the maintenance cost of software solutions is usually lower than that of hardware transformation. Hardware transformation may require continuous maintenance, upgrades and replacements, while software can maintain its effectiveness and security through simple updates.
[0099] 3. Flexibility and adaptability: This application is implemented through software, making the solution more flexible and more adaptable to embedded devices of different models and configurations. Compared with hardware modification, software solutions are easier to customize and optimize to meet the needs of specific devices. It has higher scalability and configurability, and is easier to adapt to future expansion needs.
[0100] 4. Rapid deployment and iteration: Software solutions usually have faster deployment speed and iteration capabilities. Once a problem is found or improvement is needed, the software code can be updated quickly without waiting for hardware manufacturing or distribution. This helps speed up product development and optimization.
[0101] 5. Enhance system reliability: Solving the problem of the TPCM module not measuring the BIOS through software can enhance the overall reliability of the system, because the software can more accurately control the timing and method of sending the reset signal, thereby avoiding startup abnormalities caused by hardware failures or unstable factors.
[0102] 6. Promote technological innovation and integration: This application demonstrates the technological innovation and integration between the operating system layer and the hardware security module (TPCM module), providing a more powerful security guarantee for the system. The collaborative work of the two is achieved through software, providing ideas and references for more similar technological innovations in the future.
[0103] 7. Improve user experience: For end users, this application provides a more stable and reliable embedded device experience, because the system can start and run normally, without causing startup abnormalities or security issues due to the TPCM module not measuring the BIOS.
[0104] To sum up, the innovation of this application lies not only in the transformation of its technical implementation method from hardware to software, but also in its advantages in flexibility, adaptability, rapid deployment, reduced maintenance costs, enhanced system reliability, promotion of technological innovation and integration, and improved user experience.
[0105] In another embodiment of the present application, another device trusted startup method is disclosed. The method is based on the TPCM module and includes:
[0106] Receiving a reset signal sent by a trusted software base agent; the reset signal is sent to the TPCM module by the trusted software base agent using a hot start instruction to search for a corresponding event type from a restart notification chain, calling a callback function of the event type, and sending the reset signal to the TPCM module through the callback function;
[0107] Using the reset signal to switch the mode to the main mode;
[0108] Perform a full boot measurement operation on the device.
[0109] In another embodiment of the present application, performing a complete startup measurement operation on a device includes: performing trustworthy measurement on a BIOS, a kernel, and an application of the device in sequence to obtain a measurement result.
[0110] It should be noted that the device trusted startup method described in the present application is the same as the device trusted startup method described in any of the above method embodiments. The difference is that the present application is implemented based on the TPCM module. Therefore, this embodiment does not elaborate on the specific implementation process.
[0111] In another embodiment of the present application, a device trusted startup system is disclosed, including:
[0112] The trusted software base agent is used to receive the hot start instruction, use the hot start instruction to find the corresponding event type from the restart notification chain, call the callback function of the event type, and send a reset signal to the TPCM module through the callback function;
[0113] The TPCM module is used to receive a reset signal, use the reset signal to switch the mode to the main mode, and perform a complete startup measurement operation on the device.
[0114] In the embodiment, the implementation process of the device trusted boot system can refer to the above method embodiment, which will not be described in detail here.
[0115] See also Figure 7 , Figure 7 A schematic diagram of a device trusted startup device structure provided in an embodiment of the present application, the device is based on a trusted software base agent, and specifically includes:
[0116] A first receiving module 11, used for receiving a hot start instruction;
[0117] A search module 12, used to use the hot start instruction to search for a corresponding event type from the restart notification chain;
[0118] The calling module 13 is used to call the callback function of the event type and send a reset signal to the TPCM module through the callback function, so that the TPCM module switches the mode to the main mode through the reset signal and performs a complete startup measurement operation on the device.
[0119] As an optional embodiment, the device further includes:
[0120] A determination module is used to determine the event type and callback function to be registered;
[0121] The registration module is used to register the event type and the callback function to the restart notification chain.
[0122] As an optional embodiment, the search module is specifically used for: if the hot start instruction is a reboot command, searching for a system restart event type from a restart notification chain; the system restart event type includes SYS_DOWN and SYS_RESTART.
[0123] As an optional embodiment, the search module is specifically used for: if the hot start instruction is a shutdown command, searching for a corresponding system suspend event type from the restart notification chain; the system suspend event type is SYS_HALT.
[0124] As an optional embodiment, the callback function uses the TPCM communication driver to send the reset information to the TPCM module.
[0125] In another embodiment of the present application, a device trusted startup apparatus is provided, which is based on a TPCM module and specifically includes:
[0126] A second receiving module is used to receive a reset signal sent by the trusted software base agent; the reset signal is sent to the TPCM module by the trusted software base agent using a hot start instruction to find a corresponding event type from the restart notification chain and calling a callback function of the event type;
[0127] A switching module, used for switching the mode to a main mode using the reset signal;
[0128] Operation module, used to perform full boot measurement operations on the device.
[0129] As an optional embodiment, the operation module is specifically used to perform trust measurement on the BIOS, kernel and application of the device in sequence to obtain measurement results.
[0130] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0131] See also Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device specifically includes:
[0132] A processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. The processor 21 executes the steps of the device trusted startup method described in any of the above method embodiments through the computer program.
[0133] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0134] The memory 22 may include one or more computer-readable storage media, which may be non-transitory. The memory 22 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used to store the following computer program 221, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps in the device trusted startup method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 22 may also include an operating system 222 and data 223, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 222 may include Windows, Unix, Linux, etc.
[0135] In some embodiments, the electronic device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a sensor 26 , a power source 27 , and a communication bus 28 .
[0136] certainly, Figure 8 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Figure 8 More or fewer components than shown, or combinations of certain components.
[0137] In another exemplary embodiment, a computer storage medium is also provided, and when the program instructions are executed by the processor, the steps of the device trusted startup method described in any of the above method embodiments are implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0138] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0139] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0140] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A device trusted startup method, characterized in that: The method is based on a trusted software base agent, and the method comprises: Receive hot start command; Using the hot start instruction, searching for a corresponding event type from the restart notification chain; The callback function of the event type is called, and a reset signal is sent to the TPCM module through the callback function, so that the TPCM module switches the mode to the main mode through the reset signal and performs a complete startup measurement operation on the device.
2. The device trusted startup method according to claim 1, characterized in that: Before receiving a hot start notification, also include: Determine the event type and callback function to be registered; Register the event type and the callback function to the restart notification chain.
3. The device trusted startup method according to claim 1, characterized in that: Using the hot start instruction, searching the restart notification chain for the corresponding event type includes: If the hot start instruction is a reboot command, the system restart event type is searched from the restart notification chain; the system restart event type includes SYS_DOWN and SYS_RESTART.
4. The device trusted startup method according to claim 1, characterized in that: Using the hot start instruction, searching the restart notification chain for the corresponding event type includes: If the hot start instruction is a shutdown command, the corresponding system suspend event type is searched from the restart notification chain; the system suspend event type is SYS_HALT.
5. The device trusted startup method according to any one of claims 1 to 4, characterized in that: Sending a reset signal to the TPCM module through the callback function includes: The callback function uses the TPCM communication driver to send the reset information to the TPCM module.
6. A device trusted startup method, characterized in that: The method is based on the TPCM module, and the method comprises: Receiving a reset signal sent by a trusted software base agent; the reset signal is sent to the TPCM module by the trusted software base agent using a hot start instruction to search for a corresponding event type from a restart notification chain, calling a callback function of the event type, and sending the reset signal to the TPCM module through the callback function; Using the reset signal to switch the mode to the main mode; Perform a full boot measurement operation on the device.
7. The device trusted startup method according to claim 6, characterized in that: Performs a full boot measurement operation on the device, including: The BIOS, kernel and application of the device are measured in turn for trustworthiness and the measurement results are obtained.
8. A device trusted boot system, characterized in that: include: A trusted software base agent, configured to receive a hot start instruction, use the hot start instruction to search for a corresponding event type from a restart notification chain, call a callback function of the event type, and send a reset signal to the TPCM module through the callback function; The TPCM module is used to receive the reset signal, use the reset signal to switch the mode to the main mode, and perform a complete startup measurement operation on the device.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the device trusted startup method described in any one of claims 1 to 5 of the present application, or the steps of the device trusted startup method described in claim 6 or 7, through the computer program.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the steps of the device trusted startup method described in any one of claims 1 to 5 of the present application, or the steps of the device trusted startup method described in claim 6 or 7.