%\subsection{Defenses Against Cache Timing Attacks}

The research community has brought forward various defenses against cache
timing attacks. PLcache \citep{wang2007bscache, kong2008nobscache} and the
Random Fill Cache Architecture (RFill, \citep{liu2014randomfill}) were designed
and analyzed in the context of a small region of sensitive data, and scaling
them to protect a potentially large enclave without compromising performance is
not straightforward. When used to isolate entire enclaves in the LLC, RFill
performs at least 37\%-66\% worse than Sanctum.

RPcache \citep{wang2007bscache, kong2008nobscache} trusts the OS to assign
different hardware process IDs to mutually mistrusting entities, and its
mechanism does not directly scale to large LLCs. The non-monopolizable cache
\citep{domnitser2012nomo} uses a well-principled partitioning scheme, but does
not completely stop leakage, and relies on the OS to assign hardware process
IDs. CATalyst~\citep{liu2016catalyst} trusts the Xen hypervisor to correctly tame Intel's Cache Allocation Technology into providing
cache pinning, which can only secure software whose code and data fits into a
fraction of the LLC.

A fair share of the cache timing attack countermeasures cited here focus on
protecting relatively small pieces of code and data that are loosely coupled to
the rest of the application. The countermeasures are suitable for cryptographic
keys and the algorithms that operate on them, but do not scale to larger
codebases. This is a questionable approach, because crypto keys have no
intrinsic value, and are only attacked to gain access to the sensitive data
that they protect. For example, in a medical image processing application, the
sensitive data may be patient X-rays. A high-resolution image uses at least a
few megabytes, so the countermeasures above will leave the X-rays vulnerable to
cache timing attacks while they are operated on by image processing algorithms.

Sanctum uses very simple cache partitioning~\citep{lin2008coloring} based on
page coloring~\citep{taylor1990coloring, kessler1992coloring}, which has proven
to have reasonable overheads. It is likely that sophisticated schemes like
ZCache \citep{sanchez2010zcache} and Vantage \citep{sanchez2011vantage} can be
combined with Sanctum's framework to yield better performance.
