6 LIMITATION AND FUTURE
DIRECTIONS
We recognize that the major limitation of the current
work is that it is only feasible when defending against
transient execution attacks that use side-channels such
as Flush+Reload and Flush+Flush. Attacks, such as
Prime+Probe, can still succeed. The first step we take
is to use a temporary cache block to store the latest
loaded cache line instead of putting the data into the
cache directly before servicing all of the pending re-
quests. Very often the temporary cache line will be
evicted after servicing, thus helping to decrease the
success rate and bandwidth of the Prime+Probe at-
tack.
Our discussions of the design details are based
on a single thread model. The proposed design can
be expanded to work with a multi-core system. In a
multi-core system, a cache line loaded during the tran-
sient execution window by one thread can be accessed
by another thread before it is evicted from the cache.
This forms a temporary side channel in the shared L3
cache. We can resolve this problem by taking advan-
tage of the saturating counter associated with each
cache line. For a system with n cores, if a transient
cache line is loaded into the L3 cache and all of the
cores are accessing this cache line transiently during
the same transient window, the reference count of this
transiently loaded cache line in L3 can reach up to
n. Thus, a cache line with a reference count greater
than n has established its bona fides as a non-transient
data. The L3 cache can respond to requests to this line
in the usual manner. However, if the reference count
of a cache line is less than n, the L3 cache can delay
its response to simulate a cache miss.
7 RELATED WORK
Since the discovery of Spectre and Meltdown, a wide
variety of defenses were proposed by both CPU ven-
dors and other researchers. Most of these proposed
defenses involve either mitigating transient execution
or mitigating the side channel. Adding a fence in-
struction after each branch instruction is the most in-
tuitive approach that can defend against transient exe-
cution. However, this approach abandons the benefits
of speculative execution causing an average of 88%
performance loss (Yan et al., 2018).
To limit the covert channels, hardware mitigation
approaches are also proposed by researchers. Safe-
Spec (Khasawneh et al., 2019) propose to introduce
extra shadow structures for caches and the TLBs to
store speculative states temporarily. If an instruction
is squashed in the pipeline, the corresponding entry
in the shadow structures will be discarded to leave no
traces in the micro-architecture. However, the extra
shadow structure requires a larger area to implement
compared to our proposed design.
REFERENCES
Hamerly, G., Perelman, E., Lau, J., and Calder, B. (2005).
Simpoint 3.0: Faster and more flexible program phase
analysis. Journal of Instruction Level Parallelism,
7(4):1–28.
Khasawneh, K. N., Koruyeh, E. M., Song, C., Evtyushkin,
D., Ponomarev, D., and Abu-Ghazaleh, N. (2019).
Safespec: Banishing the spectre of a meltdown with
leakage-free speculation. In 2019 56th ACM/IEEE
Design Automation Conference (DAC), pages 1–6.
IEEE.
Kocher, P., Horn, J., Fogh, A., Genkin, D., Gruss, D., Haas,
W., Hamburg, M., Lipp, M., Mangard, S., Prescher, T.,
et al. (2019). Spectre attacks: Exploiting speculative
execution. In 2019 IEEE Symposium on Security and
Privacy (SP), pages 1–19. IEEE.
Lipp, M., Schwarz, M., Gruss, D., Prescher, T., Haas, W.,
Mangard, S., Kocher, P., Genkin, D., Yarom, Y., and
Hamburg, M. (2018). Meltdown. arXiv preprint
arXiv:1801.01207.
Muralimanohar, N., Balasubramonian, R., and Jouppi, N. P.
(2009). Cacti 6.0: A tool to model large caches. HP
laboratories, 27:28.
Osvik, D. A., Shamir, A., and Tromer, E. (2006). Cache at-
tacks and countermeasures: the case of aes. In Cryp-
tographers’ track at the RSA conference, pages 1–20.
Springer.
Patil, H., Pereira, C., Stallcup, M., Lueck, G., and Cownie,
J. (2010). Pinplay: a framework for deterministic re-
play and reproducible analysis of parallel programs.
In Proceedings of the 8th annual IEEE/ACM interna-
tional symposium on Code generation and optimiza-
tion, pages 2–11.
Saileshwar, G. and Qureshi, M. K. (2019). Cleanupspec:
An” undo” approach to safe speculation. In Pro-
ceedings of the 52nd Annual IEEE/ACM International
Symposium on Microarchitecture, pages 73–86.
Van Bulck, J., Minkin, M., Weisse, O., Genkin, D., Kasikci,
B., Piessens, F., Silberstein, M., Wenisch, T. F.,
Yarom, Y., and Strackx, R. (2018). Foreshadow: Ex-
tracting the keys to the intel {SGX} kingdom with
transient {Out-of-Order} execution. In 27th USENIX
Security Symposium (USENIX Security 18), pages
991–1008.
Yan, M., Choi, J., Skarlatos, D., Morrison, A., Fletcher, C.,
and Torrellas, J. (2018). Invisispec: Making specula-
tive execution invisible in the cache hierarchy. In 2018
51st Annual IEEE/ACM International Symposium on
Microarchitecture (MICRO), pages 428–441. IEEE.
SECRYPT 2022 - 19th International Conference on Security and Cryptography
660