Object-Level Metadata Locator for Memory Safety
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing metadata storage and retrieval processes for memory safety face challenges such as compatibility issues with un-instrumented system components, inability to cope with heterogeneous systems, scalability limitations, and high memory overheads.
Innovation Solution
A method and system for locating object-level metadata using page-level metadata or a bit vector, allowing efficient object-level metadata tracking and scaling to an arbitrary number of objects while minimizing memory overhead.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If pointer size is increased to carry metadata, then memory safety validation capability is improved, but compatibility with un-instrumented system components deteriorates
Solution Approach 1:
The metadata is segmented into two parts: page-level metadata stored in a dedicated metadata storage structure, and object-level metadata embedded in the pointer. This segmentation allows the pointer to remain a standard size while still carrying necessary object-level metadata, and page-level metadata provides additional context without requiring pointer modification.
Solution Approach 2:
A page-level metadata structure acts as an intermediary between the pointer and the complete object metadata. The page-level metadata contains a pointer to the full object-level metadata, allowing the system to retrieve complete metadata information without requiring the pointer itself to be enlarged.
2Reliability
If proportional metadata storage to program memory footprint is used, then memory safety tracking completeness is improved, but memory overhead increases
Solution Approach 1:
Multiple objects that reside on the same memory page share a common page-level metadata structure. This merging approach reduces redundant metadata storage, as objects on the same page can reference the same page-level metadata rather than each maintaining separate complete metadata structures.
Solution Approach 2:
The metadata storage is organized in a hierarchical dimension: page-level metadata provides first-level organization and contains pointers to object-level metadata. This dimensional organization allows efficient retrieval without requiring proportional storage for every object, as the page-level structure serves multiple objects simultaneously.
3Speed
If upper pointer bits are used as table index for retrieving base and size of live objects, then retrieval speed is improved, but scalability to arbitrarily large number of live allocations deteriorates
Solution Approach 1:
The metadata retrieval process is segmented into two stages: first, use upper pointer bits as an index to quickly locate page-level metadata (fast initial filtering); second, use the page-level metadata pointer to retrieve the complete object-level metadata (detailed information retrieval). This segmentation maintains fast retrieval while enabling scalability.
Solution Approach 2:
The page-level metadata acts as an intermediary layer between the pointer index and the complete object metadata. The upper pointer bits index into the page-level metadata structure, which then provides a pointer to the full object-level metadata. This intermediary approach enables scalable retrieval without limiting the number of live allocations.
Data Source
AI summary
Metadata generally refers to data that describes, or gives information about, other data. Metadata can be used for a wide variety of purposes, including for ensuring the safety of memory accesses. For example, to prevent memory safety errors, metadata, which indicates the base address and size of the data, can be used to validate memory access requests as prerequisite to allowing the memory access. While there are many useful applications of metadata, including for memory safety as mentioned above, the underlying metadata storage and retrieval processes that have been developed to date suffer from various problems. The present disclosure provides an object-level metadata locator, which can allow for an internal object layout to be maintained and which can scale to an arbitrary number of objects while requiring lower memory overhead than that required in the prior art.


