Kernel Debugging via Kwasm Engine

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current kernel debugging methods for Linux systems are complex and require deep knowledge of kernel source codes and compilation environments, making them inaccessible to non-professionals and prone to system downtime if used improperly.

Innovation Solution

A kernel debugging system comprising a user interface module, compilation module, and a Kwasm engine installed in the system kernel to interpret and execute WebAssembly object files, allowing developers to write program codes without focusing on kernel details, using a simplified interface and supporting 64-bit formats.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional kernel debugging methods (modifying kernel source codes, Kgdb, Perf, ftrace) are used, then kernel debugging capability is achieved, but system complexity and professional requirements increase significantly

Engineering Contradiction:
Improvekernel debugging capabilityVSAvoiddebugging system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediate debugging system that sits between the user and the kernel, translating high-level debugging operations into kernel-specific actions. This intermediary layer abstracts the complexity of kernel debugging, allowing users to debug kernels without directly modifying source codes or understanding intricate kernel internals.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a virtual copy or model of the kernel debugging environment that runs independently from the actual kernel. This copying approach allows developers to simulate and debug kernel behaviors without directly interfering with the running kernel, reducing system complexity and risk.

Inventive Principle:
Principle #26Copying

2Adaptability or versatility

If kernel source codes are modified and recompiled for debugging, then debugging flexibility is improved, but system stability and downtime risks increase

Engineering Contradiction:
Improvedebugging flexibilityVSAvoidsystem stability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent performs debugging preparations in advance by creating debuggable versions of kernel code or preparing debugging configurations before the actual debugging session. This preliminary action allows debugging to be conducted on prepared artifacts rather than requiring live modification of running kernel code, thus maintaining system stability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements protective measures beforehand, such as creating backup kernel images, setting up rollback mechanisms, or using virtualization to isolate debugging operations. These cushioning measures ensure that if debugging operations cause issues, the system can be restored without downtime or stability problems.

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

3Adaptability or versatility

If new kernel modules are created for debugging, then debugging functionality is enhanced, but compilation environment requirements and matching complexity increase

Engineering Contradiction:
Improvedebugging functionalityVSAvoidcompilation environment requirements
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The patent designs a universal debugging module or framework that can work across different kernel versions and configurations without requiring separate compilation environments for each case. This multi-functional approach eliminates the need for complex matching between debug modules and specific kernel source codes.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent uses configurable parameters and metadata to adapt debugging modules to different kernel environments dynamically, rather than requiring static compilation matching. By changing parameters at runtime based on the target kernel's characteristics, the system enhances debugging functionality without imposing strict compilation environment requirements.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11768757B2Kernel debugging system and method
Publication Date: 2023.09.26 BLACK SESAME TECH INC
  • US11768757B2 patent drawing
  • US11768757B2 patent drawing
  • US11768757B2 patent drawing

AI summary

The present application relates to a kernel debugging system and method. The kernel debugging system includes: a user interface module, the user interface module being configured to edit program codes and output an execution result of the program codes; a compilation module, the compilation module being configured to compile the program codes into object files; and a Kwasm engine, the Kwasm engine being directly installed in a system kernel of an operating system, and being configured to interpret and execute the object files in a kernel mode, so as to obtain the execution result of the program codes. On the basis of the kernel debugging system, a user can write program codes like writing a common application program, namely, the program codes can be run and executed in a system kernel without paying attention to details of the system kernel.