Crate swage_core

Crate swage_core 

Source
Expand description

§Swage Core

swage-core is the foundational library for the Swage Rowhammer attack framework. It provides a modular, trait-based architecture that enables composable implementations of memory allocation strategies, hammering techniques, and victim orchestration.

§Architecture Overview

The framework is built around three core traits that define the interface for each component:

  • allocator::ConsecAllocator - Defines memory allocation strategies for obtaining consecutive physical memory blocks required for Rowhammer attacks.

  • hammerer::Hammering - Defines the interface for different hammering implementations that perform the actual memory access patterns to trigger bit flips.

  • victim::VictimOrchestrator - Defines the interface for victim applications or memory regions that are targeted by the attack and checked for bit flips.

§Main Components

  • Swage - The main orchestrator that combines an allocator, hammerer, and victim to execute complete Rowhammer experiments with profiling and reproducibility checks.

  • memory module - Provides memory management abstractions including memory::Memory, memory::ConsecBlocks, and various traits for memory initialization and checking.

  • util module - Contains utility types and functions including util::Size for memory size representations and various helper traits.

§Platform Support

This framework is designed for x86_64 Linux systems with access to physical memory information through /proc/self/pagemap and related interfaces. Some operations and modules require elevated privileges (root access) or custom kernel modules.

Modules§

allocator
Memory allocation strategies for Rowhammer attacks.
hammerer
Rowhammer hammering traits.
memory
The memory module provides abstractions for memory management, initialization, and checking for bitflips.
page_inject
Page injection utilities for controlled memory placement.
util
Utility functions and types used throughout the Swage framework.
victim
Victim orchestration for Rowhammer attacks.

Macros§

retry
Macro for retrying operations until they succeed.

Structs§

ExcludeFromInit
List of page addresses to exclude from initialization.
ExperimentData
Results from a complete Rowhammer experiment.
HammerVictimTargetCheck
Target-specific bit flip checker.
MemCheck
Memory-checking victim implementation.
RoundProfile
Profiling results from a series of hammering rounds.
Swage
Main orchestrator for conducting end-to-end Rowhammer experiments.
SwageConfig
Configuration parameters for Swage experiments.

Enums§

DataPatternKind
Data pattern selection for configuration.