Kernel Tracing in Protected Environments via Hypervisor Mediation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Kernel protection mechanisms are incompatible with tracing technology, preventing the implementation of kernel tracing features, which are essential for debugging and analysis.

Innovation Solution

A method and system that allow kernel tracing in a protected kernel environment by scanning the kernel to locate instructions, replacing them with other instructions, activating a kernel protection feature, and using a hypervisor to detect and authorize modifications, ensuring that only authorized code variants are written to specific locations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If kernel protection mechanisms are implemented to prevent kernel modification, then kernel integrity is improved, but kernel tracing capability deteriorates

Engineering Contradiction:
Improvekernel integrityVSAvoidkernel tracing capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

A hypervisor is introduced as an intermediary between the kernel protection mechanism and the tracing technology. The hypervisor receives tracing requests from user space, validates them against authorized code variants, and mediates the modification process by only allowing changes at pre-approved locations. This intermediary layer enables tracing functionality while preserving kernel integrity through centralized authorization control.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary actions by pre-scanning the kernel to identify authorized code variants and their locations before any modification occurs. Authorized code variants are pre-validated and registered with the hypervisor. When tracing is needed, the system only modifies pre-approved locations with pre-validated code, eliminating the need for runtime validation of modification legitimacy.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If tracing technology is implemented to allow kernel modification, then kernel tracing capability is improved, but kernel protection deteriorates

Engineering Contradiction:
Improvekernel tracing capabilityVSAvoidkernel integrity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The hypervisor implements a feedback mechanism that continuously monitors and validates tracing requests. When a tracing operation attempts to modify the kernel, the hypervisor receives feedback about the requested modification, validates it against the pre-stored authorized code variants, and either permits or blocks the change. This feedback loop ensures that only legitimate tracing operations are allowed, maintaining kernel integrity while enabling tracing capability.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system applies local quality by differentiating between different locations in the kernel. Instead of treating the entire kernel uniformly, the system identifies specific locations that contain authorized code variants and allows modifications only at these designated locations. Other kernel regions remain protected from modification, enabling fine-grained control that preserves integrity while allowing necessary tracing functionality.

Inventive Principle:
Principle #3Local quality

3Reliability

If kernel protection mechanisms prevent all modifications, then kernel integrity is improved, but debugging capability deteriorates

Engineering Contradiction:
Improvekernel integrityVSAvoiddebugging capability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The kernel modification process is segmented into distinct controlled operations. The hypervisor separates the tracing request validation phase from the actual code modification phase. First, authorized code variants are identified and registered; then, when debugging is needed, only specific segmented portions of the kernel at pre-approved locations can be modified with validated code. This segmentation enables debugging operations without compromising overall kernel integrity.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10019343B2Kernel tracing in a protected kernel environment
Publication Date: 2018.07.10 RED HAT ISRAEL
  • US10019343B2 patent drawing
  • US10019343B2 patent drawing
  • US10019343B2 patent drawing

AI summary

Methods, systems, and computer program products are included for performing tracing in a protected kernel environment. A method includes scanning at least a portion of a kernel to locate one or more instructions. The locations of the one or more instructions are provided to a hypervisor. The one or more instructions are replaced with one or more other instructions. After replacing the one or more instructions, a kernel protection feature is activated. After activating the kernel protection feature, they hypervisor detects an attempted modification of the kernel. The hypervisor determines that the attempted modification corresponds to the at least one location provided to the hypervisor and that the attempted modification corresponds to an authorized code variant. The hypervisor modifies the kernel to include the authorized code variant at the at least one location.