Driver hot upgrade method and device, electronic equipment and storage medium
By dividing the Linux system kernel driver module into a file system driver layer and a business function driver layer, using the file system driver layer to block and restore access to user-state business modules, online hot upgrade of the Linux system kernel driver is realized, solving the problem of upgrading in the existing technology that affects business continuity.
Patent Information
- Application Number
- CN202410203360.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-23
- Publication Date
- 2025-08-26
AI Technical Summary
When upgrading the Linux system kernel driver, the existing technology requires system restart or user-modified operation of business modules, which affects business continuity and system stability, especially in data center scenarios.
The kernel driver module is divided into a file system driver layer and a business function driver layer. The file system driver layer blocks access to user-state business modules during the upgrade period, and restores access after the upgrade is completed to realize the online hot upgrade of the driver.
The driver upgrade does not require system restart or business module exit, simplifies the upgrade process, avoids system abnormalities, and ensures that upper-level services are not perceived.
Smart Images

Figure CN120540671A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a drive thermal upgrade method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of mobile internet, cloud computing, big data, and other related technologies, the embedded sector is placing increasingly stringent demands on data center servers and communications equipment. In particular, for reliability and maintainability, system operations and maintenance must not impact the business operations of the system. Therefore, even for rigid demands requiring version updates due to system failures, a multi-layered update and upgrade strategy is required. For example, priority is given to completing minor upgrades that have no impact on customer business, using hot-patch-based upgrade solutions. Secondly, when migrating local business to a backup server, rapid online upgrades for module-level changes are completed, using process-based / modularized online upgrade solutions. Finally, when suspending business or migrating business to a backup server, major version changes can be restarted and upgraded.
[0003] Module-level driver upgrade requirements encompass both user-mode process-based application modules and kernel-mode modular KO (Kernel Object) drivers. Kernel-mode drivers in Linux (GNU / Linux, a freely available and freely distributed UNIX-like operating system) systems are divided into two categories: mature Linux framework drivers, which require little modification or upgrades; and standardized business KO drivers, which are designed for product design and can be independently developed and maintained, but face update requirements to address issues and address changing requirements. To interact or communicate with user-mode programs, these standardized business KO drivers typically provide various user interfaces, with SysFS (System File System) being the most popular. This provides access to kernel data structures, allowing user programs to view and control system devices and resources. SysFS makes kernel information available to user programs in the form of files. Therefore, there is a need for upgrades based on standard SysFS driver modules.
[0004] Currently, the following solutions exist for kernel driver maintenance and upgrades of Linux systems for customers' on-line communication equipment: Local kernel driver function adjustments involve multiple function code logics within a single driver file, and user-mode business modules may not perceive the changes and do not require modification. These solutions are usually addressed by either online upgrading of a single driver or by upgrading the entire driver package and restarting the system.
[0005] An analysis of existing solutions reveals that adjusting and updating the logical functions within a single driver requires restarting the customer's networked device system. Alternatively, the system can be updated without a restart through rapid unloading and loading, but the interacting user-mode business modules may need to undergo complex processes such as exiting, restarting, and fault-tolerance processing. This means that customers must accept business adjustments, migration, and recovery, or tolerate a certain degree of system anomalies and errors for a short period of time. Therefore, existing solutions are not user-friendly for customer-operated device systems, especially for high-end equipment in data center scenarios, which can impact customer business. Summary of the Invention
[0006] In view of this, an object of the present invention is to provide a drive thermal upgrade method, device, electronic device and storage medium.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] In a first aspect, the present invention provides a driver hot upgrade method, which is applied to a Linux system. The Linux system includes a user-mode business module and a kernel driver module that interact through a file system node. The kernel driver module includes a file system driver layer and a business function driver layer. The driver hot upgrade method includes:
[0009] When receiving a driver upgrade instruction, obtaining a new driver in the driver upgrade instruction;
[0010] Blocking the user-mode service module's access to the service function driver layer through the file system driver layer;
[0011] Uninstalling the old driver in the business function driver layer and installing the new driver into the business function driver layer to upgrade the business function driver layer;
[0012] After the upgrade of the service function driver layer is completed, the access of the user-mode service module to the service function driver layer is restored through the file system driver layer.
[0013] In an optional implementation manner, the Linux system further includes a virtual file system, and the file system node is registered with the virtual file system through the file system driver layer.
[0014] In an optional implementation, the step of blocking, through the file system driver layer, the user-mode service module's access to the service function driver layer includes:
[0015] The access state of the user-state service module to the file system node is set to a blocking state through the file system driver layer, so as to block the user-state service module from accessing the service function driver layer.
[0016] In an optional implementation manner, the step of uninstalling the old driver in the business function driver layer includes:
[0017] The old driver is uninstalled in the business function driver layer, and the application programming interface API pointer set registered by the old driver in the file system driver layer is cancelled.
[0018] In an optional implementation, the step of installing the new driver into the business function driver layer includes:
[0019] The new driver is installed in the business function driver layer, and an API pointer set is registered with the file system driver layer based on the new driver.
[0020] In an optional implementation, the step of restoring the user-mode service module's access to the service function driver layer through the file system driver layer includes:
[0021] The access block of the user-state service module to the file system node is released through the file system driver layer, so as to restore the access of the user-state service module to the service function driver layer.
[0022] In a second aspect, the present invention provides a driver hot upgrade device, which is applied to a Linux system. The Linux system includes a user-mode business module and a kernel driver module that interact through a file system node. The kernel driver module includes a file system driver layer and a business function driver layer. The driver hot upgrade device includes:
[0023] A program acquisition module, configured to, upon receiving a driver upgrade instruction, acquire a new driver program in the driver upgrade instruction;
[0024] A blocking access module, configured to block the user-mode service module from accessing the service function driver layer through the file system driver layer;
[0025] A driver update module, configured to uninstall the old driver in the business function driver layer and install the new driver into the business function driver layer to upgrade the business function driver layer;
[0026] The access recovery module is used to restore the access of the user-mode business module to the business function driver layer through the file system driver layer after the upgrade of the business function driver layer is completed.
[0027] In an optional implementation manner, the Linux system further includes a virtual file system, and the file system node is registered with the virtual file system through the file system driver layer.
[0028] In a third aspect, the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the drive thermal upgrade method described in any one of the aforementioned embodiments is implemented.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the drive thermal upgrade method described in any one of the aforementioned embodiments is implemented.
[0030] The present invention provides a driver hot upgrade method, device, electronic device and storage medium. The method is applied to a Linux system and includes a user-mode business module and a kernel driver module that interact through a file system node. The kernel driver module includes a file system driver layer and a business function driver layer. When the Linux system receives a driver upgrade instruction, it obtains a new driver in the driver upgrade instruction. The file system driver layer blocks the user-mode business module's access to the business function driver layer. The old driver in the business function driver layer is then uninstalled, and the new driver is installed in the business function driver layer to upgrade the business function driver layer. After the business function driver layer upgrade is completed, the file system driver layer restores the user-mode business module's access to the business function driver layer. The file system driver layer controls the access process of the user-mode business module to complete the upgrade of the business function driver layer during the period of blocking user access, thereby realizing online hot upgrade of the driver. During the driver upgrade, there is no need for system restart or business module exit, simplifying the upgrade process. At the same time, the upper-layer business is not aware of it, avoiding system abnormalities.
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 A schematic diagram of the Linux system framework provided by an embodiment of the present invention is shown;
[0034] Figure 2 A schematic diagram of a process flow of a drive thermal upgrade method provided by an embodiment of the present invention is shown;
[0035] Figure 3 It shows a functional module diagram of a drive thermal upgrade device provided by an embodiment of the present invention;
[0036] Figure 4 A block diagram of an electronic device provided by an embodiment of the present invention is shown.
[0037] Icons: 100 - electronic device; 110 - processor; 120 - memory; 130 - communication module; 300 - driver hot upgrade device; 310 - program acquisition module; 330 - blocking access module; 350 - driver update module; 370 - recovery access module. DETAILED DESCRIPTION
[0038] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0039] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but is merely intended to represent selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0040] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0041] See also Figure 1, is a schematic diagram of the framework of a Linux system provided by an embodiment of the present invention. The Linux system includes two process spaces: user state and kernel state, and also includes a standard file system node, namely a Linux SysFS node, for implementing interaction between user state and kernel state. The user state includes user state service modules, and the kernel state includes kernel driver modules.
[0042] Unlike existing technologies, the kernel driver module in this embodiment is divided into two driver layers: the file system driver layer (SysFSDriver) and the service function driver layer (Function Driver). The file system driver layer manages the interaction between the kernel driver module and the user-mode service module; the service function driver layer provides service functions to the user-mode service module.
[0043] based on Figure 1 The Linux system framework is shown, and the following describes the various steps in the various methods provided by the embodiments of the present invention and the corresponding technical effects.
[0044] See also Figure 2 , is a flow chart of a drive thermal upgrade method provided by an embodiment of the present invention.
[0045] Step S202: When a driver upgrade instruction is received, a new driver in the driver upgrade instruction is obtained;
[0046] Step S204: blocking the user-mode service module's access to the service function driver layer through the file system driver layer;
[0047] In this embodiment, when the Linux system receives a driver upgrade instruction, it will obtain the new driver program in the driver upgrade instruction, and will also block the user-mode business module's access to the business function driver layer through the file system driver layer, even if the kernel driver module enters the driver upgrade preparation state.
[0048] It can be understood that upon receiving a driver upgrade instruction, the driver upgrade begins immediately. The file system driver layer manages the interaction between the kernel driver module and the user-mode service module. Therefore, the file system driver layer can block the user-mode service module's access process, thus preventing the user-mode service module from accessing the service function driver layer during the driver upgrade, which could cause system errors and other abnormalities.
[0049] Step S206: uninstalling the old driver in the business function driver layer and installing the new driver into the business function driver layer to upgrade the business function driver layer;
[0050] Step S208: After the business function driver layer upgrade is completed, the user mode business module's access to the business function driver layer is restored through the file system driver layer;
[0051] In this embodiment, after blocking the user-mode service module's access process, the service function driver layer can be updated and upgraded. The old driver (Function Driver old) in the service function driver layer is uninstalled, and the new driver (Function Driver new) is installed in the service function driver layer. Then, after the service function driver layer upgrade is complete, the user-mode service module's access process is restored through the file system driver layer, thereby restoring the user-mode service module's access to the service function driver layer.
[0052] It can be understood that the embodiment of the present invention divides the kernel driver module into a file system driver layer and a business function driver layer. The file system driver layer blocks the access process of the user-mode business module before the business function driver layer is upgraded, and restores the access process of the user-mode business module after the business function driver layer upgrade is complete. This avoids system anomalies during the driver upgrade and only temporarily stops the access process of the user-mode business module, eliminating the need to exit or restart the user-mode business module, simplifying the upgrade process. At the same time, the upper-layer business is unaware of the upgrade during the upgrade, without any impact on business, thus achieving an online hot upgrade of the driver.
[0053] It can be seen from the above steps that when the Linux system receives the driver upgrade instruction, it obtains the new driver in the driver upgrade instruction; and blocks the user-mode business module's access to the business function driver layer through the file system driver layer; then it uninstalls the old driver in the business function driver layer, and installs the new driver to the business function driver layer to upgrade the business function driver layer; then after the business function driver layer upgrade is completed, it restores the user-mode business module's access to the business function driver layer through the file system driver layer. The file system driver layer controls the access process of the user-mode business module to complete the upgrade of the business function driver layer during the period of blocking user access, thereby realizing the online hot upgrade of the driver, and there is no need for system restart or business module exit during the driver upgrade, which simplifies the upgrade process and achieves the upper-layer business unawareness, avoiding system abnormalities.
[0054] It's understood that the Linux system also includes a virtual file system, or SysFS. This virtual file system can be understood as a file system used to transfer information and configuration mechanisms between user mode and kernel mode. It contains file system nodes that enable interaction between user-mode service modules and kernel driver modules. In other words, the kernel driver module can register the corresponding file system node with the virtual file system to provide an interactive interface for the user-mode service module. The user-mode service module can then interact with the kernel driver module through this interactive interface provided by the file system node.
[0055] In this embodiment, since the kernel driver module is divided into a file system driver layer and a business function driver layer, and the file system driver layer is used to manage the interaction between the user-state business module and the kernel driver module, the file system driver layer registers the file system node to the virtual file system to generate an interaction interface between the user-state business module and the kernel driver module.
[0056] Optionally, for step S204, an embodiment of the present invention provides a possible implementation method, namely: through the file system driver layer, the access status of the user-state business module to the file system node is set to a blocked state to block the user-state business module's access to the business function driver layer.
[0057] In this embodiment, upon receiving a driver upgrade instruction, the file system node can be debugged using the debugging method provided by the file system driver layer. This will set the flag indicating the access status of the file system node to 1, thereby blocking the user-mode service module's access to the file system node. The user-mode service module's access process will then be blocked at the file system driver layer, preventing it from accessing the service function driver layer. This effectively blocks the user-mode service module's access to the service function driver layer.
[0058] Optionally, for the process of uninstalling the old driver in the business function driver layer in step S206, an embodiment of the present invention provides a possible implementation method, namely: uninstalling the old driver in the business function driver layer and canceling the application programming interface API pointer set registered by the old driver in the file system driver layer.
[0059] It can be understood that the file system driver layer plays a connecting role in the kernel driver module, that is, facing the upper layer, the file system driver layer can register the file system node with the virtual file system to manage the interaction between the user-mode business module and the kernel driver module; facing the lower layer, the file system driver layer can also provide the business function driver layer with an API (Application Programming Interface) pointer set for registration by the business function driver layer.
[0060] It can be understood that the business function driver layer can register multiple APIs in the driver program to the file system driver layer, so that the user-state business module can access the corresponding API in the business function driver layer through the API pointer in the file system driver layer to call the corresponding business function.
[0061] In this embodiment, when the old driver is uninstalled in the business function driver layer, the API pointer set registered by the old driver in the file system driver layer will also be canceled, that is, the multiple API pointers corresponding to the old driver will be set to invalid, thereby avoiding the user-mode business module accessing the invalid API and causing system abnormalities.
[0062] Optionally, for the process of installing the new driver into the business function driver layer in step S206, an embodiment of the present invention provides a possible implementation method, namely: installing the new driver in the business function driver layer, and registering an API pointer set with the file system driver layer based on the new driver.
[0063] In this embodiment, since the corresponding API pointer set is canceled in the file system driver layer when the old driver is uninstalled, when the new driver is installed in the business function driver layer, multiple APIs in the new driver will also be registered in the file system driver layer to obtain a new API pointer set, thereby facilitating the user-mode business module to access the new API through the new API pointer to call the updated business function.
[0064] Optionally, for step S208, an embodiment of the present invention provides a possible implementation method, namely: through the file system driver layer, unblocking the user-mode business module's access to the file system node to restore the user-mode business module's access to the business function driver layer.
[0065] In this embodiment, after the service function driver layer upgrade is complete, the file system node can be debugged using the debugging method provided by the file system driver layer. This will set the flag indicating the access status of the file system node to 2, thereby unblocking the user-mode service module's access to the file system node. This will then restore the user-mode service module's access process, which was blocked at the file system driver layer, and allow it to continue accessing the service function driver layer. This restores the user-mode service module's access to the service function driver layer.
[0066] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for driving the thermal upgrade device is given below. Figure 3 , Figure 3This is a functional module diagram of the drive thermal upgrade device 300 provided in an embodiment of the present invention. It should be noted that the basic principles and technical effects of the drive thermal upgrade device 300 provided in this embodiment are the same as those of the above embodiments. For the sake of simplicity, any matters not mentioned in this embodiment can be referred to the corresponding contents in the above embodiments. The drive thermal upgrade device 300 includes:
[0067] The program acquisition module 310 is used to acquire the new driver program in the driver upgrade instruction when receiving the driver upgrade instruction;
[0068] The access blocking module 330 is used to block the user mode business module from accessing the business function driver layer through the file system driver layer;
[0069] The driver update module 350 is used to uninstall the old driver in the business function driver layer and install the new driver to the business function driver layer to upgrade the business function driver layer;
[0070] The access recovery module 370 is used to restore the user-mode business module's access to the business function driver layer through the file system driver layer after the business function driver layer upgrade is completed.
[0071] Optionally, the Linux system further includes a virtual file system, and the file system node is registered with the virtual file system through the file system driver layer.
[0072] Optionally, the blocking access module 330 is further configured to set the access state of the user-mode business module to the file system node to a blocking state through the file system driver layer, so as to block the user-mode business module from accessing the business function driver layer.
[0073] Optionally, the driver update module 350 is further configured to: uninstall the old driver in the business function driver layer, and cancel the application programming interface API pointer set registered by the old driver in the file system driver layer.
[0074] Optionally, the driver update module 350 is further configured to: install a new driver in the business function driver layer, and register an API pointer set with the file system driver layer based on the new driver.
[0075] Optionally, the access restoration module 370 is further configured to: unblock the user-mode service module's access to the file system node through the file system driver layer, so as to restore the user-mode service module's access to the service function driver layer.
[0076] The present invention also provides an electronic device. Figure 4, is a schematic diagram of an electronic device provided by an embodiment of the present invention. The electronic device includes a processor 110, a memory 120, and a communication module 130. Each component is electrically connected to each other, directly or indirectly, to enable data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.
[0077] The processor 110 is used to read / write data or programs stored in the memory 120 and execute corresponding functions. It can be a general-purpose processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; it can also be a DSP digital signal processor, an ASIC application-specific integrated circuit, an FPGA off-the-shelf programmable gate array or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0078] The memory 120 is used to store programs or data. The memory 120 can be RAM (Random Access Memory), ROM (Read Only Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electric Erasable Programmable Read-Only Memory), etc.
[0079] The communication module 130 is used to communicate signaling or data with other devices.
[0080] It is understandable that Figure 4 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 4 More or fewer components than shown, or with Figure 4 Different configurations shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0081] Furthermore, the electronic device is deployed with a Linux system, and a memory in the electronic device stores a computer program. When the processor executes the computer program, the drive hot upgrade method disclosed in the embodiment of the present invention is implemented through the Linux system.
[0082] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the drive thermal upgrade method disclosed in the embodiment of the present invention is implemented.
[0083] In summary, the present invention has the following beneficial effects compared with the prior art: (1) The present invention supports online hot upgrade of a single driver, and does not require system restart or business module exit or re-run to make the driver effective. Moreover, during the driver upgrade, the upper-layer business can be unaware, and no system abnormalities will be caused, and there will be no impact on business operations. (2) The present invention has good versatility and can be implemented based on the standard driver framework of the Linux system, without restrictions on hardware architecture. (3) The present invention provides an intermediate technical solution to support system upgrade and maintenance between hot patch technology and conventional system restart upgrade, which can better meet the needs of system upgrade and maintenance. (4) The present invention is applicable to all embedded products based on the standard driver framework of the Linux system, and can be applied to harsh scenarios where hot patch technology is inconvenient to implement and customers require that the entire upgrade and maintenance process should not have any impact on the business, such as system upgrades of data center equipment. It can achieve a higher-level technical supplement to hot patch technology and has good market application prospects.
[0084] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or actions, or can be implemented using a combination of dedicated hardware and computer instructions.
[0085] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0086] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as 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.
[0087] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A drive thermal upgrade method, characterized in that: Applied to a Linux system, the Linux system includes a user-mode business module and a kernel driver module that interact through a file system node. The kernel driver module includes a file system driver layer and a business function driver layer. The driver hot upgrade method includes: When receiving a driver upgrade instruction, obtaining a new driver in the driver upgrade instruction; Blocking the user-mode service module's access to the service function driver layer through the file system driver layer; Uninstalling the old driver in the business function driver layer and installing the new driver into the business function driver layer to upgrade the business function driver layer; After the upgrade of the service function driver layer is completed, the access of the user-mode service module to the service function driver layer is restored through the file system driver layer.
2. The drive thermal upgrade method according to claim 1, characterized in that: The Linux system further includes a virtual file system, and the file system node is registered with the virtual file system through the file system driver layer.
3. The drive thermal upgrade method according to claim 1, characterized in that: The step of blocking the user-mode service module's access to the service function driver layer through the file system driver layer includes: The access state of the user-state service module to the file system node is set to a blocking state through the file system driver layer, so as to block the user-state service module from accessing the service function driver layer.
4. The drive thermal upgrade method according to claim 1, characterized in that: The step of uninstalling the old driver in the business function driver layer includes: The old driver is uninstalled in the business function driver layer, and the application programming interface API pointer set registered by the old driver in the file system driver layer is cancelled.
5. The drive thermal upgrade method according to claim 1, characterized in that: The step of installing the new driver into the business function driver layer includes: The new driver is installed in the business function driver layer, and an API pointer set is registered with the file system driver layer based on the new driver.
6. The drive thermal upgrade method according to claim 1, characterized in that: The step of restoring the user-mode service module's access to the service function driver layer through the file system driver layer includes: The access block of the user-state service module to the file system node is released through the file system driver layer, so as to restore the access of the user-state service module to the service function driver layer.
7. A drive thermal upgrade device, characterized in that: Applied to a Linux system, the Linux system includes a user-mode business module and a kernel driver module that interact through a file system node. The kernel driver module includes a file system driver layer and a business function driver layer. The driver hot upgrade device includes: A program acquisition module, configured to, upon receiving a driver upgrade instruction, acquire a new driver program in the driver upgrade instruction; A blocking access module, configured to block the user-mode service module from accessing the service function driver layer through the file system driver layer; A driver update module, configured to uninstall the old driver in the business function driver layer and install the new driver into the business function driver layer to upgrade the business function driver layer; The access recovery module is used to restore the access of the user-mode business module to the business function driver layer through the file system driver layer after the upgrade of the business function driver layer is completed.
8. The drive thermal upgrade device according to claim 7, characterized in that: The Linux system further includes a virtual file system, and the file system node is registered with the virtual file system through the file system driver layer.
9. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the drive thermal upgrade method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the drive thermal upgrade method according to any one of claims 1 to 6.
Citation Information
Cited By
Method for upgrading kernel and driver of operating system
CN120909626A