Work

Energy Implications of Mitigating Side-Channel Attacks on Branch Prediction

Year: 2025
Type: article
Abstract: Spectre variants 1 and 2 pose grave security threats to the dynamic branch predictors in CPUs. This study examines experimentally the impact of mitigating those threats on energy and power consumption. The research obtained empirical data from an HPC-class CPU via embedded sensors with fine-grained energy readings. This approach black-boxed otherwise complex behaviors in and around the CPU. It was crucial to the concrete energy estimates reported here. The study identified factors that impacted the energy behaviors of branching (the attack vector for Spectre). It focused on compiler-based mitigation strategies vs. a no-mitigation baseline on three main compilers in wide use. It utilized a standard suite of microbenchmarks to gauge the consumption likely due to branch prediction under mixed branch and mitigation conditions. Results showed that the energy consumption varied significantly across the compilers, depending on the tasks. Loop unrolling affected the power consumption as it altered the number and distribution of branches. Speculative execution had a role in conserving energy. Reducing execution time was accompanied by an increase in instantaneous power. Since Spectre mitigations limit that feature, they should be applied selectively to the code patterns vulnerable to attacks. This work hopes to create an awareness of the energy costs of securing CPUs against Spectre attacks. It suggests directions for better energy-aware mitigation strategies. It highlights the importance of fitting compiler and optimization settings to application needs to balance security, performance, and power. The study provides compiler writers with recommendations that help build secure and power-efficient software.
Source: Computers
Language: English
Open Access status: gold
Estimated APC paid: $2,172
OpenAlex ID: W4407640240
FWCI: 0.825
Cites: 33
Cited by: 2
Related to: 10