Guard Word Mechanism for Hardware Stack Corruption Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing environments face challenges in detecting and preventing corruption of call stacks, which can lead to unexpected return addresses, potentially causing malicious or innocent data corruption, and existing solutions are inadequate in ensuring data integrity.
Innovation Solution
The implementation of a guard word mechanism, where a specific word is stored in the call stack and checked by called routines to verify its integrity, using hardware instructions to detect corruption and prevent data corruption by ensuring the return address is valid.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a guard word mechanism is implemented to detect stack corruption, then stack corruption detection capability is improved, but device complexity increases due to additional instructions and checking logic
Solution Approach 1:
The guard word is placed on the stack in advance before the return address, serving as a preliminary protective measure. This allows the called routine to detect corruption before it reaches the return address, enabling early intervention without complex real-time monitoring mechanisms.
Solution Approach 2:
The guard word acts as an intermediary element between the calling routine and the return address. By checking this intermediate value, the system can detect corruption without directly monitoring the return address itself, simplifying the detection mechanism while maintaining reliability.
2Reliability
If guard word checking is performed in every called routine, then data integrity is improved, but processing time increases due to additional checking operations
Solution Approach 1:
The system performs guard word checking in a partial manner - only in called routines that may potentially corrupt the stack. Not all routines require this checking, allowing the system to balance data integrity with processing efficiency by applying protection selectively rather than universally.
3Reliability
If the guard word is stored directly in the stack protecting the return address, then stack protection is improved, but the stack structure complexity increases
Solution Approach 1:
The stack structure is segmented into distinct regions: the guard word region and the return address region. This segmentation allows independent management and checking of each component, simplifying the overall protection mechanism by treating the guard word as a separate, manageable unit rather than integrating it complexly with the return address storage.
Data Source
AI summary
Corruption of program stacks is detected by using guard words placed in the program stacks. An instruction, which is to be used in protecting stacks of a computing environment, is provided in a called routine, based on determining that the called routine is to include logic to detect corruption of stacks. The instruction in the called routine is to check a guard word provided by a calling routine to determine whether a stack is corrupt.


