Expand description
Enhanced memory tracking for unsafe Rust and FFI operations
This module extends the basic memory tracking to handle:
- Unsafe Rust memory operations (std::alloc::alloc, raw pointers)
- FFI memory operations (malloc, free from C libraries)
- Cross-boundary memory transfers
- Safety violation detection
Structs§
- Allocation
Metadata - Metadata about memory allocations from LibC
- Allocation
Origin - Information about where memory was originally allocated
- Boundary
Event - Cross-boundary memory event
- Boundary
Event Analysis - Comprehensive analysis of a boundary event
- Boundary
Event Statistics - Statistics for boundary events
- Boundary
Risk Assessment - Risk assessment for boundary transfers
- Boundary
Risk Factor - Individual risk factor for boundary transfers
- CFunction
Info - Information about a specific C function
- CLibrary
Info - C Library information for detailed tracking
- Compliance
Status - Compliance status
- Comprehensive
Safety Report - Comprehensive safety analysis report
- Enhanced
Allocation Info - Enhanced allocation info with unsafe/FFI tracking
- Enhanced
LibC Hook Info - Enhanced LibC hook information with detailed tracking
- Error
Pattern - Error pattern analysis
- Function
Performance Metrics - Performance metrics for C functions
- Hook
Installation Details - Details about hook installation
- LibC
Hook Info - Information about LibC function hooks
- Library
Metadata - Library metadata
- Memory
Access Pattern - Memory access pattern analysis
- Memory
Passport - Memory “passport” for tracking cross-boundary transfers
- Memory
Protection Flags - Memory protection flags
- Ownership
Info - Current ownership information
- Ownership
Record - Record in the ownership chain
- Ownership
Transfer Event - Ownership transfer event
- Passport
Stamp - A stamp in the memory passport journey
- Peak
Period - Peak allocation period
- Performance
Impact - Performance impact analysis
- Risk
Assessment - Comprehensive risk assessment for unsafe operations
- Risk
Factor - Individual risk factor in an assessment
- Runtime
Behavior Analysis - Runtime behavior analysis for hooked functions
- Security
Analysis - Security analysis for hooked functions
- Security
Implication - Security implication of boundary crossing
- Security
Vulnerability - Security vulnerability information
- Size
Distribution - Size distribution analysis
- Stack
Frame - Stack frame information for call stack tracking
- Temporal
Patterns - Temporal patterns in allocations
- Transfer
Metadata - Metadata for cross-boundary transfers
- UnsafeFFI
Stats - Statistics for unsafe and FFI operations
- UnsafeFFI
Tracker - Enhanced memory tracker for unsafe/FFI operations
- Unsafe
Operation - Represents a single unsafe operation
Enums§
- Allocation
Source - Enhanced allocation source tracking
- Boundary
Event Type - Types of boundary events
- Boundary
Risk Factor Type - Types of boundary risk factors
- Error
Type - Types of errors that can be detected
- Hook
Installation Method - Methods for installing hooks
- Hook
Method - Methods for hooking LibC functions
- Memory
Pattern Type - Types of memory access patterns
- Ownership
Validation Status - Status of ownership validation
- Performance
Impact Level - Levels of performance impact
- Risk
Factor Type - Types of risk factors that can be detected
- Risk
Level - Risk levels for safety violations
- Safety
Violation - Safety violation types
- Security
Clearance - Security clearance levels for memory operations
- Security
Implication Type - Types of security implications
- Unsafe
Operation Type - Types of unsafe operations
- Validation
Method - Methods for validating cross-boundary transfers
- Validity
Status - Validity status of a memory passport
- Vulnerability
Type - Types of security vulnerabilities
Functions§
- get_
global_ unsafe_ ffi_ tracker - Get the global unsafe/FFI tracker instance
- get_
global_ unsafe_ tracker - Get the global unsafe/FFI tracker instance
- init_
global_ unsafe_ tracker - Initialize the global unsafe/FFI tracker