Hot Patch Function for Dynamic Kernel and User Space Code Updates
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing hot patching systems for computer systems require frequent modification of software code, leading to inefficiencies, added complexity, and potential system instability, especially in CPU architectures with variable instruction sizes, and lack flexibility and compatibility with function tracing subsystems.
Innovation Solution
Modifying the original function to include a call instruction for a hot patch function that transfers execution control to a replacement function, allowing conditional patching and encapsulating patch management within the hot patch function, which is compatible with tracing subsystems and does not require modifying the original function's code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the software code of the original function is modified every time a patch is installed or updated, then the patching can be applied, but it takes up a lot of time and adds complexity
Solution Approach 1:
The patent pre-modifies the original function's software code to include a call instruction that jumps to a hot patch function. This preliminary modification is done once, and subsequent patches are applied by simply updating the hot patch function's code, avoiding repeated modifications to the original function and significantly reducing patch installation time.
Solution Approach 2:
The patent introduces a hot patch function as an intermediary between the original function and the replacement function. The original function calls the hot patch function, which then transfers execution control to the replacement function. This intermediary structure allows patches to be applied by updating only the hot patch function, rather than modifying the original function repeatedly.
2Reliability
If the software code of the original function is modified every time a patch is installed or updated, then the patching can be applied, but it adds complexity and makes it harder to ensure atomicity of the change
Solution Approach 1:
The hot patch function serves as an intermediary that simplifies the patching process. By centralizing the patching logic in the hot patch function, the system reduces complexity and makes it easier to ensure atomicity of changes, as all modifications are concentrated in one location rather than scattered across multiple function modifications.
Solution Approach 2:
The original function is pre-modified to include a call instruction to the hot patch function. This preliminary action establishes a stable structure that remains unchanged during patching, reducing the complexity of repeated modifications and making atomicity easier to ensure.
3Reliability
If traditional patching requires rebooting the system before patches take effect, then the patching can be applied, but it is highly disruptive to users and affects system availability
Solution Approach 1:
The patent implements dynamic patching where the hot patch function can transfer execution control to replacement functions during system operation without requiring a reboot. This dynamic approach allows patches to be applied and taken effect immediately, maintaining system availability and avoiding disruption to users.
Solution Approach 2:
The system maintains continuous operation by allowing patches to be applied and executed without interrupting the system's useful action. The hot patch function enables seamless transition to replacement functions while the system remains operational, ensuring uninterrupted service to users.
4Reliability
If generic hot patching systems modify the software code of the original function, then patching can be performed, but it lacks flexibility and compatibility with function tracing subsystems
Solution Approach 1:
The hot patch function acts as an intermediary that maintains compatibility with function tracing subsystems. By placing the patching logic in the hot patch function rather than modifying the original function, the system preserves the original function's structure for tracing purposes while still enabling dynamic patching through the intermediary hot patch function.
Data Source
AI summary
A mechanism for patching functions in use on a running computer system. A method includes modifying an original function to call a hot patch function. The hot patch function transfers execution control from the original function to a replacement function.


