summaryrefslogtreecommitdiff
path: root/chap/chap2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'chap/chap2.tex')
-rw-r--r--chap/chap2.tex7
1 files changed, 5 insertions, 2 deletions
diff --git a/chap/chap2.tex b/chap/chap2.tex
index 0366d03..3224d22 100644
--- a/chap/chap2.tex
+++ b/chap/chap2.tex
@@ -477,11 +477,14 @@ Spectre-PHT 利用分支预测器,攻击者可以训练转移预测器,使
Spectre v1 是最早提出的 Spectre 攻击,属于 Spectre-PHT 类型。它利用受
害者程序中的分支,一个例子如下:
-\begin{minted}{C}
+\begin{figure}[htbp]
+\begin{minted}[frame=single,linenos=true]{C}
if (x < array1_size)
y = array2[array1[x] * 4096];
\end{minted}
-
+\caption{Spectre v1 受害者代码}
+\label{lst:spectre_v1}
+\end{figure}
%%%%%%%%%%%%%%%%%%%%%%% gtran: spectre v1 %%%%%%%%%%%%%%%%%%%%%%%%%%%