# GateBleed: installation and experiment entry points

Paper: **GateBleed: Exploiting On-Core Accelerator Power Gating for High Performance and Stealthy Attacks on AI**, MICRO 2025. https://doi.org/10.1145/3725843.3756097

## Requirements

The repository documents testing on a Lenovo SR650 V3 with dual-socket Intel Xeon Gold 5420+ (Sapphire Rapids), using RHEL 9.4 and Ubuntu 22.04. Intel AMX support is required for the AMX experiments. Install Git, a C/C++ compiler with support for the AMX flags in the Makefiles, GNU Make, and Python with pip/venv support. The repository's best-tested kernel is 5.14.0-427.35.1.el9; consult each experiment's README for hardware and system configuration.

## Download and prepare

```sh
git clone https://github.com/jkalya/gatebleed.git
cd gatebleed
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
```

The root requirements file pins the analysis packages. It does not declare a Python version or install every experiment-specific C/C++ dependency. Use the README and Makefile in the selected experiment directory for those dependencies. These instructions were checked against source commit `e773196dfcd281789f51e5808a653e96d6a28fbf`; the experiments have not been rerun as part of this documentation update.

## First experiment: AMX performance stages

```sh
cd 01_performance_stages
make
python3 get_rdtscp_data.py
```

Then run `python3 plot.py PATH_TO_GENERATED_CSV`, replacing the final argument with the CSV produced by the measurement script. Compare `plot.png` to `plot_original.png`. This experiment requires compatible AMX hardware; it is not a generic laptop demo.

## Other experiments

Each directory has its own README: `03_remote_gatebleed_covert_channel`, `04_remote_gatebleed_spectre`, `05_gatebleed_transformer_model`, `06_gatebleed_moe_transformer_mia`, and `07_gatebleed_cnn_model_mia`.

## Cite and obtain the archived artifact

Use [CITATION.cff](CITATION.cff) for the paper citation. The September 1, 2025 artifact is preserved at https://zenodo.org/records/17019733 with software DOI https://doi.org/10.5281/zenodo.17019733. The archive predates the current main branch and should be cited as a separate, fixed version. Its Zenodo record lists CC BY 4.0; the current GitHub repository has an Apache-2.0 license. Check the license for the exact material you use.
