Boot method and device of operating system, electronic equipment and readable storage medium
By introducing a verification system between the boot program and the operating system to perform system isolation verification, the problem of easy exposure of software code during the operating system startup process is solved, and the security improvement of reducing the attack surface is achieved.
Patent Information
- Application Number
- CN202211727552.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-12-30
AI Technical Summary
When existing operating systems perform system information verification during the startup process, software codes are easily exposed, increasing the attack surface and affecting security.
A verification system is introduced between the boot program and the operating system to verify the system information of the operating system through system isolation. The operating system is started only when the verification result meets the preset result.
The system-isolated verification system reduces the risk of software code exposure during the operating system startup process and reduces the attack surface.
Smart Images

Figure CN116048639B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a method and device for starting an operating system, an electronic device, and a readable storage medium. Background Art
[0002] After an operating system is released, different terminals and other electronic devices can install the operating system. However, the version type and permissions granted to each terminal may differ. For example, Terminal A may use a temporary version valid for only one day, while Terminal B may use a trial version valid for three months. These version types and validity periods are system information, which is stored in each terminal's operating system. Only after the system information passes verification can the terminal use the operating system normally.
[0003] Existing solutions can verify the above system information in the kernel state or user state of the operating system. However, whether the verification is performed in the kernel state or in the user state, the verification occurs during the startup process of the operating system. If the verification is performed during the startup process, the software code of the operating system may be exposed, which seriously expands the attack surface of the operating system and is not conducive to the security of the operating system. Summary of the Invention
[0004] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for starting an operating system, which are used to solve the technical problems in the background technology.
[0005] According to a first aspect of an embodiment of the present application, a method for starting an operating system is provided, which is applied to a verification system, wherein system isolation exists between the verification system and the operating system. The method includes:
[0006] In response to the received boot instruction for the operating system sent by the boot program, obtaining system information of the operating system;
[0007] Verify the system information, and if it is determined that the verification result of the system information meets the preset result, start the operating system.
[0008] In one possible implementation, starting the operating system includes:
[0009] Starting the kernel of the operating system, instructing the operating system to enter the first state, and the kernel of the operating system returns a response message to the verification system;
[0010] In response to receiving a response message returned by the kernel of the operating system, if it is determined that the response message is consistent with a preset response message, the operating system is instructed to enter the second state.
[0011] In one possible implementation, verifying system information includes:
[0012] Verification information corresponding to the operating system is determined, and the system information is matched with the verification information. If it is determined that the system information matches the verification information, then it is determined that a verification result of the system information meets a preset result.
[0013] In one possible implementation, the system information includes version signature information; the verification information includes preset signature information and the validity period of the operating system;
[0014] Match the system information with the verification information, including:
[0015] If it is determined that the version signature information matches the preset signature information and the current time is within the validity period, then it is determined that the verification result of the system information meets the preset result.
[0016] In a possible implementation, the system information is verified, and then the following steps are further included:
[0017] If it is determined that the version signature information does not match the preset signature information, or the current time is not within the validity period, the verification result of the system information is determined to be inconsistent with the preset result, and a prompt message is returned to the boot program; the prompt message is used to indicate that the system information of the operating system has failed the verification, and the operating system startup is terminated.
[0018] In one possible implementation, determining verification information corresponding to the operating system includes:
[0019] Obtain the terminal identification of the target terminal where the operating system is located, determine the current version type and validity period of the operating system in the target terminal according to the terminal identification, and determine that the signature information corresponding to the current version type is the preset signature information.
[0020] In one possible implementation, the verification system includes multiple candidate version types of the operating system;
[0021] The method also includes:
[0022] receiving a first update instruction for a version type of an operating system, and in response to the first update instruction, updating a current version type of the operating system to a target version type; the target version type is determined from a plurality of candidate version types;
[0023] A second update instruction for the validity period of the operating system is received, and in response to the second update instruction, the validity period of the operating system is updated to a new validity period.
[0024] According to a second aspect of an embodiment of the present application, a device for starting an operating system is provided, which is applied to a verification system, wherein system isolation exists between the verification system and the operating system, and the device includes:
[0025] A startup instruction response module, configured to obtain system information of the operating system in response to a startup instruction for the operating system sent by the boot program;
[0026] The verification module is used to verify the system information, and if it is determined that the verification result of the system information meets the preset result, the operating system is started.
[0027] According to a third aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, and when the processor executes the program, the steps of the method provided in the first aspect are implemented.
[0028] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in the first aspect are implemented.
[0029] According to the fifth aspect of the embodiment of the present application, a computer program product is provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. When the processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the computer device performs the steps of implementing the method provided in the first aspect.
[0030] The beneficial effects of the technical solution provided by the embodiments of the present application are:
[0031] The embodiment of the present application establishes a verification system between the boot program and the operating system. The verification system is used to verify the system information of the operating system that is system-isolated from the verification system. The operating system is started after the verification result meets the preset result. This can avoid the exposure of the operating system's software code caused by starting the operating system during the verification process, thereby reducing the attack surface of the operating system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.
[0033] Figure 1 A schematic diagram of the system architecture for implementing operating system startup provided in an embodiment of the present application;
[0034] Figure 2 A flowchart of a method for starting an operating system provided in an embodiment of the present application;
[0035] Figure 3 A flowchart of another method for starting an operating system is provided for an embodiment of the present application;
[0036] Figure 4A schematic diagram of the structure of a startup device for an operating system provided in an embodiment of the present application;
[0037] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following describes the embodiments of the present application in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0039] Those skilled in the art will understand that, unless otherwise stated, the singular forms "a", "an" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the present technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or it can refer to that the element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here can include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".
[0040] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0041] The operating system startup method, device, electronic device, computer-readable storage medium, and computer program product provided in this application are intended to solve the above technical problems in the prior art.
[0042] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on, or combine with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0043] Figure 1The schematic diagram of the system architecture for implementing operating system startup provided in the embodiment of the present application includes a boot program 110, a verification system 120, and an operating system 130. Among them, the boot program 110 intends to start the operating system and can send a startup instruction for the operating system 130 to the verification system 120; after receiving the startup instruction for the operating system 130 sent by the boot program 110, the verification system 120 obtains the system information of the operating system 130, verifies the system information, and starts the operating system 130 if the verification result meets the preset result; if the verification result does not meet the preset result, the startup of the operating system 130 is terminated. The verification system 120 verifies the operating system 130 before the operating system 130 is started, and because there is system isolation between the verification system 120 and the operating system 130, the entire verification process will not expose the code of the operating system 130, reducing the attack surface of the operating system 130.
[0044] The embodiment of the present application provides a method for starting an operating system, which is applied to a verification system. There is system isolation between the verification system and the operating system, such as Figure 2 As shown, the method includes:
[0045] Step S201 : acquiring system information of the operating system in response to a received startup instruction for the operating system sent by a boot program.
[0046] The operating system of the embodiment of the present application can be any type of operating system, such as a Linux operating system, an IOS operating system, or an Android operating system. The boot program is a program that matches the operating system and can send startup instructions for the operating system. If the operating system is a Linux operating system or an Android operating system, then the boot program can be uboot.
[0047] Typically, an operating system is started by a boot program, during which the operating system's system information is verified. However, performing verification during startup can expose the operating system's software code, increasing the operating system's attack surface. To avoid this, embodiments of the present application incorporate a verification system between the boot program and the operating system.
[0048] The verification system of the embodiment of the present application can be formed based on the relevant files with the verification system information function in the operating system, and the verification system can be regarded as a simplified operating system; the verification system can also be a virtual machine monitor (Hypervisor), and the operating system is a virtual machine operating system under its control. The embodiment of the present application does not limit the specific implementation method of the verification system. System isolation is set between the verification system and the operating system. The system isolation isolates the verification system and the operating system into two independent systems. The two can communicate through a specific interface or communication channel. The operating system itself has not changed, but the newly added verification system can verify the system information of the operating system.
[0049] In the embodiment of the present application, the operating system does not directly receive the startup instruction for the operating system sent by the boot program, but the startup instruction is received by the verification system. After receiving the startup instruction, the verification system obtains the system information of the operating system, which may include the version signature information of the operating system, etc.
[0050] Step S202: verifying the system information. If it is determined that the verification result of the system information meets the preset result, the operating system is started.
[0051] After obtaining the system information of the operating system, the verification system of the embodiment of the present application verifies the system information to obtain a verification result. If the verification result meets the preset result (verification passes), the operating system is directly started; if the verification result does not meet the preset result (verification fails), the startup of the operating system is terminated.
[0052] The embodiment of the present application establishes a verification system between the boot program and the operating system. The verification system is used to verify the system information of the operating system that is system-isolated from the verification system. The operating system is started after the verification result meets the preset result. This can avoid the exposure of the operating system's software code caused by starting the operating system during the verification process, thereby reducing the attack surface of the operating system.
[0053] An embodiment of the present application provides a possible implementation method for starting an operating system, including:
[0054] Starting the kernel of the operating system, instructing the operating system to enter the first state, and the kernel of the operating system returns a response message to the verification system;
[0055] In response to receiving a response message returned by the kernel of the operating system, if it is determined that the response message is consistent with a preset response message, the operating system is instructed to enter the second state.
[0056] In the embodiment of the present application, after the system information of the operating system is verified, the kernel of the operating system is started, so that the operating system enters a first state, which is the kernel state.
[0057] Existing solutions can verify operating system information in either kernel or user state. However, since both kernel and user state verifications occur during the OS startup process, verification performed during the startup process can be unreliable. If the OS is attacked during startup, this verification process is likely to be bypassed, forcing the OS to boot incorrectly or causing a forced or erroneous startup. This can lead to the leakage of OS data, particularly user state data.
[0058] To avoid the above situation, after the operating system of the embodiment of the present application enters the kernel state, the kernel of the operating system can establish a communication channel with the verification system through a hypercall, and send the response message of the operating system kernel to the verification system through the communication channel.
[0059] After receiving the response message, the verification system determines whether it is consistent with a preset response message. If the response message is consistent with the preset response message within the verification system, the verification system can determine that the verification of the operating system's system information has been performed and the verification result meets the preset result. The operating system can enter the second state, which is the user state of the operating system. After receiving the correct response message, the verification system allows the operating system to continue booting into the user state; otherwise, the operating system boot is terminated.
[0060] In an embodiment of the present application, a possible implementation method is provided for verifying system information, including:
[0061] Verification information corresponding to the operating system is determined, and the system information is matched with the verification information. If it is determined that the system information matches the verification information, then it is determined that a verification result of the system information meets a preset result.
[0062] In the embodiment of the present application, the verification system includes verification information of the operating system, and the system information and the verification information can be matched to determine whether the two match. If the two match, it can be determined that the verification result meets the preset result. If the two do not match, it can be determined that the verification result does not meet the preset result. The detailed verification process is described in the subsequent content.
[0063] An embodiment of the present application provides a possible implementation method, wherein the system information includes version signature information; the verification information includes preset signature information and the validity period of the operating system;
[0064] Match the system information with the verification information, including:
[0065] If it is determined that the version signature information matches the preset signature information and the current time is within the validity period, then it is determined that the verification result of the system information meets the preset result.
[0066] In the embodiment of the present application, the system information includes version signature information, which is generated based on the version type of the operating system in the target terminal. The verification system needs to verify the version signature information, specifically, to determine whether the version signature information matches the preset signature information in the verification information. If the version signature information matches the preset signature information, it is necessary to further determine whether the operating system is within the validity period. The verification system includes the validity period of the operating system. The operating system can only be used normally within the validity period. Specifically, it can determine whether the current time is within the validity period. If the current time is within the validity period, it is determined that the verification result of the system information meets the preset result.
[0067] If it is determined that the version signature information does not match the preset signature information, or the current time is not within the validity period, then the system information verification result is determined to be inconsistent with the preset result. If the verification result does not meet the preset result, the operating system cannot be started. In this case, a prompt message can be returned to the boot program. The prompt message is used to indicate that the operating system's system information has failed verification and the operating system startup is terminated.
[0068] like Figure 3 As shown, it exemplarily shows a flow chart of another method for starting an operating system in an embodiment of the present application, which is applied to a verification system and includes the following steps: step S301, the verification system obtains a boot program and sends a startup instruction for the operating system; step S302, the verification system responds to the startup instruction and obtains system information of the operating system; step S303, the verification system verifies the operating system information based on the verification information stored in itself to obtain a verification result; step S304, the verification system determines whether the verification result meets the preset result, and if so, executes steps S305 and S306 in sequence; if not, executes step S305'; in step S305, the verification system starts the kernel of the operating system, instructs the operating system to enter the first state, and the kernel of the operating system returns a response message to the verification system; step S306, the verification system responds to the response message returned by the kernel of the operating system, and if it determines that the response message is consistent with the preset response message, instructs the operating system to enter the second state; step S305', the verification system returns a prompt message to the boot program; the prompt message is used to indicate that the system information of the operating system has not passed the verification and the operating system startup is terminated.
[0069] An embodiment of the present application provides a possible implementation method for determining verification information corresponding to an operating system, including:
[0070] Obtain the terminal identification of the target terminal where the operating system is located, determine the current version type and validity period of the operating system in the target terminal according to the terminal identification, and determine that the signature information corresponding to the current version type is the preset signature information.
[0071] The verification information of the operating system in the embodiment of the present application is determined based on the terminal identifier of the target terminal where the operating system is located. Specifically, the current version type of the operating system in the target terminal can be determined based on the terminal identifier. The current version type can be any one of a temporary debugging version, a trial version, and a formal version. The functions of any two version types can be the same, but the permission information of any two version types is not exactly the same. For example, function a of the temporary call version is enabled, and function b is not enabled, while both function a and function b of the formal version are enabled.
[0072] In the embodiment of the present application, each version type has corresponding signature information. After the current version type is determined, the signature information of the current version type is used as the preset signature information.
[0073] The current version type of the operating system in the target terminal of the embodiment of the present application has a validity period. During the validity period, the current version type in the target terminal can be used normally. After the validity period, the current version type in the target terminal cannot be used normally. The embodiment of the present application can also determine the validity period of the operating system based on the terminal identifier.
[0074] After the preset signature information and validity period are determined, the preset signature information and validity period are used as verification information corresponding to the operating system.
[0075] The embodiment of the present application provides a possible implementation method, wherein the verification system includes multiple candidate version types of the operating system;
[0076] The method further includes:
[0077] receiving a first update instruction for a version type of an operating system, and in response to the first update instruction, updating a current version type of the operating system to a target version type; the target version type is determined from a plurality of candidate version types;
[0078] A second update instruction for the validity period of the operating system is received, and in response to the second update instruction, the validity period of the operating system is updated to a new validity period.
[0079] The verification system in the embodiment of the present application includes multiple candidate version types of the operating system, and the multiple candidate version types include the above-mentioned temporary debugging version, trial version and official version. The functions of each version type can be the same, but the permission information of any two version types is not exactly the same.
[0080] In the embodiment of the present application, the current version type of the operating system in the target terminal is variable. When the current version type of the operating system in the target terminal needs to be updated, since the verification system includes multiple candidate version types, the operating system can be updated through the verification system, thereby achieving flexible control of the version type of the operating system in the target terminal. Specifically, upon receiving a first update instruction for the version type of the operating system, the verification system updates the current version type of the operating system to a target version type in response to the first update instruction. The target version type is determined from multiple candidate version types. Updating the current version to the target version type can be to close the permission information specific to the current version and open the permission information specific to the target version.
[0081] It is worth noting that when the operating system is updated from the current version type to a new version type, the system information of the operating system in the target terminal also changes accordingly, that is, the version signature information in the system information is generated based on the new version type.
[0082] In addition to updating the version type of the operating system, the verification system in the embodiment of the present application can also update the validity period of the operating system. Updating the validity period of the operating system means extending the validity period or shortening the validity period. Specifically, a second update instruction for the validity period of the operating system is received, and in response to the second update instruction, the validity period of the operating system is updated to a new validity period to achieve flexible control of the validity period of the operating system.
[0083] The embodiment of the present application provides an operating system startup device, which is applied to a verification system. There is system isolation between the verification system and the operating system, such as Figure 4 As shown, the startup device 40 of the operating system may include:
[0084] The startup instruction response module 410 is used to obtain system information of the operating system in response to the startup instruction for the operating system sent by the boot program;
[0085] The verification module 420 is used to verify the system information, and if it is determined that the verification result of the system information meets the preset result, the operating system is started.
[0086] The embodiment of the present application establishes a verification system between the boot program and the operating system. The verification system is used to verify the system information of the operating system that is system-isolated from the verification system. The operating system is started after the verification result meets the preset result. This can avoid the exposure of the operating system's software code caused by starting the operating system during the verification process, thereby reducing the attack surface of the operating system.
[0087] An embodiment of the present application provides a possible implementation method, wherein the device further includes a system startup module, and the system startup module includes:
[0088] A first state entry submodule is used to start the kernel of the operating system, instruct the operating system to enter the first state, and the kernel of the operating system returns a response message to the verification system;
[0089] The second state entering submodule is configured to, in response to receiving a response message returned by the kernel of the operating system, instruct the operating system to enter the second state if it is determined that the response message is consistent with a preset response message.
[0090] An embodiment of the present application provides a possible implementation method, in which the verification module includes:
[0091] The verification submodule is used to determine the verification information corresponding to the operating system, match the system information with the verification information, and if it is determined that the system information matches the verification information, then determine that the verification result of the system information meets the preset result.
[0092] An embodiment of the present application provides a possible implementation method, wherein the system information includes version signature information; the verification information includes preset signature information and the validity period of the operating system;
[0093] The verification submodule is specifically used to determine that the verification result of the system information meets the preset result if it is determined that the version signature information matches the preset signature information and the current time is within the validity period.
[0094] A possible implementation method is provided in an embodiment of the present application. The verification submodule is also used to determine that the verification result of the system information does not meet the preset result if it is determined that the version signature information does not match the preset signature information, or the current time is not within the validity period, and return a prompt message to the boot program; the prompt message is used to indicate that the system information of the operating system has failed the verification and the operating system startup is terminated.
[0095] An embodiment of the present application provides a possible implementation method, in which the verification module includes:
[0096] The verification information determination submodule is used to obtain the terminal identification of the target terminal where the operating system is located, determine the current version type and validity period of the operating system in the target terminal according to the terminal identification, and determine that the signature information corresponding to the current version type is the preset signature information.
[0097] In an embodiment of the present application, a possible implementation method is provided, wherein a verification system includes multiple candidate version types of an operating system; the device further includes:
[0098] A first update module is configured to receive a first update instruction for a version type of the operating system, and update a current version type of the operating system to a target version type in response to the first update instruction; the target version type is determined from a plurality of candidate version types;
[0099] The second updating module is configured to receive a second updating instruction for the validity period of the operating system, and update the validity period of the operating system to a new validity period in response to the second updating instruction.
[0100] The device of the embodiment of the present application can execute the method provided by the embodiment of the present application, and its implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, and will not be repeated here.
[0101] In an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory. The processor executes the above-mentioned computer program to implement the steps of the operating system startup method. Compared with the related art, the following can be achieved: In an embodiment of the present application, a verification system is established between the boot program and the operating system. The verification system is used to verify the system information of the operating system that is system-isolated from the verification system, and the operating system is started after the verification result meets the preset result. This can avoid the exposure of the operating system software code caused by starting the operating system during the verification process, thereby reducing the attack surface of the operating system.
[0102] In an alternative embodiment, an electronic device is provided, such as Figure 5 As shown, Figure 5 The electronic device 5000 shown includes: a processor 5001 and a memory 5003. The processor 5001 and the memory 5003 are connected, for example, via a bus 5002. Optionally, the electronic device 5000 may further include a transceiver 5004, which may be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the number of transceivers 5004 is not limited to one, and the structure of the electronic device 5000 does not constitute a limitation on the embodiments of the present application.
[0103] Processor 5001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 5001 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0104] The bus 5002 may include a path for transmitting information between the above components. The bus 5002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 5002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0105] The memory 5003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation here.
[0106] The memory 5003 is used to store the computer program for executing the embodiments of the present application, and the execution is controlled by the processor 5001. The processor 5001 is used to execute the computer program stored in the memory 5003 to implement the steps shown in the above method embodiments.
[0107] Among them, the electronic equipment package may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0108] The embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiments can be implemented. Compared with the prior art, the embodiments of the present application can achieve the following: by establishing a verification system between the boot program and the operating system, the verification system is used to verify the system information of the operating system that is system-isolated from the verification system, and the operating system is started after the verification result meets the preset result. This can avoid the exposure of the operating system's software code caused by starting the operating system during the verification process, thereby reducing the attack surface of the operating system.
[0109] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0110] The present application also provides a computer program product, including a computer program, which, when executed by a processor, can implement the steps and corresponding contents of the aforementioned method embodiment. Compared with the prior art, the present application can achieve the following: by establishing a verification system between the boot program and the operating system, the verification system is used to verify the system information of the operating system that is system-isolated from the verification system, and the operating system is started after the verification result meets the preset result. This can avoid the exposure of the operating system's software code caused by starting the operating system during the verification process, thereby reducing the attack surface of the operating system.
[0111] The terms "first," "second," "third," "fourth," "1," "2," and the like (if any) in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than that shown or described in the drawings.
[0112] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the order of implementation of these steps is not limited to the order indicated by the arrows. Unless otherwise clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart can include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage in these sub-steps or stages can also be executed at different times respectively. Under different scenarios at the execution time, the execution order of these sub-steps or stages can be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0113] The above are only optional implementation methods for some implementation scenarios of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of this application, the use of other similar implementation methods based on the technical ideas of this application also falls within the protection scope of the embodiments of this application.
Claims
1. A method for starting an operating system, characterized in that: Applied to a verification system, where there is system isolation between the verification system and the operating system, the method includes: In response to a received boot instruction for the operating system sent by the boot program, obtaining system information of the operating system; Verifying the system information, and if it is determined that the verification result of the system information meets the preset result, starting the operating system; The starting of the operating system includes: Starting the kernel of the operating system, instructing the operating system to enter the first state, and the kernel of the operating system returning a response message to the verification system; In response to receiving the response message returned by the kernel of the operating system, if it is determined that the response message is consistent with a preset response message, the operating system is instructed to enter a second state.
2. The startup method according to claim 1, characterized in that: The verifying the system information includes: Verification information corresponding to the operating system is determined, and the system information is matched with the verification information. If it is determined that the system information matches the verification information, then it is determined that a verification result of the system information meets the preset result.
3. The startup method according to claim 2, characterized in that: The system information includes version signature information; The verification information includes preset signature information and the validity period of the operating system; The matching the system information with the verification information includes: If it is determined that the version signature information matches the preset signature information and the current time is within the validity period, it is determined that the verification result of the system information meets the preset result.
4. The startup method according to claim 3, characterized in that: The verifying of the system information further includes: If it is determined that the version signature information does not match the preset signature information, or the current time is not within the validity period, it is determined that the verification result of the system information does not meet the preset result, and a prompt message is returned to the boot program; the prompt message is used to indicate that the system information of the operating system has failed the verification, and the operating system startup is terminated.
5. The startup method according to claim 3, characterized in that: The determining the verification information corresponding to the operating system includes: Obtain a terminal identifier of a target terminal where the operating system is located, determine a current version type and validity period of the operating system in the target terminal according to the terminal identifier, and determine that signature information corresponding to the current version type is preset signature information.
6. The startup method according to any one of claims 3 to 5, characterized in that: The verification system includes a plurality of candidate version types of the operating system; The method further comprises: receiving a first update instruction for a version type of an operating system, and in response to the first update instruction, updating a current version type of the operating system to a target version type; the target version type is determined from the plurality of candidate version types; A second update instruction for the validity period of the operating system is received, and in response to the second update instruction, the validity period of the operating system is updated to a new validity period.
7. A startup device for an operating system, characterized in that: Applied to a verification system, there is system isolation between the verification system and the operating system, and the device includes: a startup instruction response module, configured to obtain system information of the operating system in response to a startup instruction for the operating system sent by the boot program; A verification module, configured to verify the system information and, if it is determined that the verification result of the system information meets a preset result, start the operating system; The verification module is also used to start the kernel of the operating system, instruct the operating system to enter the first state, and the kernel of the operating system returns a response message to the verification system; in response to receiving the response message returned by the kernel of the operating system, if it is determined that the response message is consistent with the preset response message, the operating system is instructed to enter the second state.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Operating system starting method and device
CN106406895A