Live OS Kernel Updates via Shadow Data Structures

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for updating operating system kernels and binary software require restarts, leading to significant downtime and vulnerability to security issues, especially when applying patches to complex systems like Linux kernels, due to challenges in extracting and safely linking changed code, managing data structure modifications, and ensuring safe code updates without disrupting CPU execution.

Innovation Solution

A system and method for preparing live binary updates by analyzing and comparing original and modified source codes at an intermediate representation level, allowing for safe in-memory modifications without disrupting execution, and using shadow data structures to extend existing data structures, enabling updates without rebooting the system.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional OS kernel updates are applied, then security issues are patched, but the system requires reboot causing significant downtime

Engineering Contradiction:
Improvesecurity patchingVSAvoidsystem downtime
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the kernel update process into multiple independent components: loading the new kernel into memory, patching specific kernel modules, and selectively replacing code sections without requiring a full system reboot. This allows security patches to be applied incrementally to specific kernel components while the rest of the system continues running.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by loading and validating the new kernel code into memory before actually switching to it. The system prepares patch data structures, verifies code integrity, and sets up shadow data structures in advance, ensuring that when the update is applied, the transition is seamless and requires no downtime.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If live binary updates are applied without reboot, then system availability is maintained, but challenges arise in extracting and safely linking changed code

Engineering Contradiction:
Improvesystem availabilityVSAvoidcode extraction and linking complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces intermediary data structures that act as mediators between the original kernel code and the patched code. Shadow data structures are created that mirror the original kernel's data structures, allowing the system to safely apply patches by redirecting references to these shadow structures. This intermediary layer simplifies the complex task of code extraction and linking by providing a controlled transition mechanism.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates copies of the kernel code and data structures in shadow memory regions. Instead of directly modifying the running kernel, the system copies the patched code sections and replaces references incrementally. This copying approach allows safe extraction and linking of changed code without disrupting the running system, as the original code remains intact until the patch is fully validated.

Inventive Principle:
Principle #26Copying

3Adaptability or versatility

If data structure modifications are applied during live update, then updated functionality is achieved, but data corruption risk increases

Engineering Contradiction:
Improveupdated functionalityVSAvoiddata corruption risk
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent implements beforehand cushioning by creating shadow data structures that serve as a safety buffer during the update process. Before modifying any data structures, the system prepares shadow copies with the updated structure. If any corruption occurs during the transition, the system can detect it and rollback to the original structures, preventing data loss. This cushioning mechanism allows functional updates while maintaining data integrity.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

Solution Approach 2:

The patent incorporates feedback mechanisms that continuously monitor the integrity of data structures during the live update process. The system checks for corruption by comparing shadow structures with original structures and validates pointers and references. If any data corruption is detected, the feedback loop triggers an automatic rollback or error handling, ensuring that updated functionality is achieved only when data integrity is confirmed.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9696989B1Systems and methods for generating and applying operating system live updates
Publication Date: 2017.07.04 TUXCARE INC
  • US9696989B1 patent drawing
  • US9696989B1 patent drawing
  • US9696989B1 patent drawing

AI summary

Method for generation of a live update including compiling original source code into a first intermediate representation (IR) code; compiling modified source code into second IR code; analyzing and comparing the first and second IR codes to identify variables and functions that were changed generating a part of final IR code with all the original variables and functions; generating an additional part of final IR code with new code for modified portions of the changed original functions, added functions and variables, and marking it for compilation into special code/data sections; and compiling a new object code and a final executable binary based on the final IR. The final executable object code includes the original code and data from original application binary, and a live update code and data from additional part of final IR generated. The live update code and data refer to original code and data where needed via standard object code relocation information.