Processor Version Number Memory Corruption Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current memory corruption detection methods, such as debugging tools like Oracle Solaris Studio, Purify, Valgrind, and Insure++, are inefficient as they significantly slow down program execution due to instrumentation, and there is a need for more effective mechanisms to detect memory corruption in type-unsafe programming languages like C and C++ that support arbitrary pointer arithmetic and deallocation.
Innovation Solution
The proposed solution involves associating version numbers with data structures in physical memory, where the processor generates and compares version numbers during memory access operations, setting a trap if a mismatch is detected, thereby enabling efficient memory corruption detection without the performance overhead of traditional instrumentation methods.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If debugging tools perform instrumentation of the computer program for memory corruption detection, then detection capability is improved, but program execution speed deteriorates significantly
Solution Approach 1:
The patent replaces software-based instrumentation mechanisms with hardware-based detection mechanisms. The processor includes specialized circuitry that automatically detects memory corruption through version number comparison during memory access operations, eliminating the need for external debugging tools and their associated performance overhead.
Solution Approach 2:
The memory system performs self-detection of corruption through built-in version number tracking. Each memory location stores a version number, and the processor automatically compares version numbers during read/write operations to detect corruption, enabling the system to monitor its own integrity without external assistance.
2Measurement precision
If version numbers are stored in every memory location for corruption detection, then detection precision is improved, but memory space consumption increases
Solution Approach 1:
The patent merges the version number with the data payload in the same memory location. Instead of storing version numbers separately in metadata structures, each memory location that stores data also stores its version number, combining two functions into a single storage unit and eliminating redundant memory usage.
Solution Approach 2:
Memory locations serve dual purposes: storing both the actual data and its associated version number for corruption detection. This multi-functional approach allows the same memory infrastructure to support both data storage and integrity verification without requiring separate dedicated storage for version information.
Data Source
AI summary
Systems and methods for providing additional instructions for supporting efficient memory corruption detection in a processor. A physical memory may be a DRAM with a spare bank of memory reserved for a hardware failover mechanism. Version numbers associated with data structures allocated in the memory may be generated so that version numbers of adjacent data structures are different. A processor determines that a fetched instruction is a memory access instruction corresponding to a first data structure within the memory. For instructions that are not a version update instruction, the processor compares the first version number and second version number stored in a location in the memory indicated by the generated address and flags an error if there is a mismatch. For version update instructions, the processor performs a memory access operation on the second version number with no comparison check.


