Hot Patch Function for Dynamic Kernel and User Space Code Updates

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvepatching effectivenessVSAvoidpatch installation time
Core Design Contradiction:
ReliabilityVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvepatching effectivenessVSAvoidpatching system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
Improvepatching effectivenessVSAvoidsystem availability
Core Design Contradiction:
ReliabilityVSEase of operation

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.

Inventive Principle:
Principle #15Dynamics

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.

Inventive Principle:
Principle #20Continuity of useful action

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

Engineering Contradiction:
Improvepatching effectivenessVSAvoidcompatibility with tracing subsystems
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10310863B1Patching functions in use on a running computer system
Publication Date: 2019.06.04 RED HAT INC
  • US10310863B1 patent drawing
  • US10310863B1 patent drawing
  • US10310863B1 patent drawing

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.