summaryrefslogtreecommitdiff
path: root/chap/chap3.tex
diff options
context:
space:
mode:
Diffstat (limited to 'chap/chap3.tex')
-rw-r--r--chap/chap3.tex40
1 files changed, 20 insertions, 20 deletions
diff --git a/chap/chap3.tex b/chap/chap3.tex
index a5fe00c..68baf93 100644
--- a/chap/chap3.tex
+++ b/chap/chap3.tex
@@ -1,9 +1,9 @@
-\chapter{Meltdown 和 Spectre 攻击的防御方案及分析}\label{sec:defense}
+\chapter{Meltdown 和 Spectre 防御方法与分析}\label{sec:defense}
Meltdown 和 Spectre 及其多种变体被发现后,研究者提出了多种减轻这些攻击
的软硬件防御方法。本章讨论并分析已有的防御方法。
-\section{Meltdown型攻击的防御}
+\section{Meltdown 型攻击的防御}
Meltdown 型攻击利用了暂态指令可以读取体系结构层次上不可访问的数据,并且
用此数据做计算。因此一种防御方式是使体系结构层次上不可访问的数据,在微
@@ -17,7 +17,7 @@ Meltdown 攻击的方案。它的作用是在用户空间中去除内核空间
新的 Linux 内核在上下文切换时,对所有进程都会保存和恢复浮点寄存器,从
而用户程序使用浮点寄存器都不会产生异常,从而消除这种攻击。
-\section{Spectre型攻击的防御}
+\section{Spectre 型攻击的防御}
Spectre 型攻击的防御方案可以分为三类:阻止推测式执行、防止暂态指令访问
秘密数据、切断隐蔽信道或降低隐蔽信道的精度。研究者在软件和硬件方面都提
@@ -70,8 +70,8 @@ retpoline\supercite{retpoline} 是 Google 提出的防御 Spectre-BTB 的方法
Webkit 在数组访问中使用索引掩码(index masking)\supercite{webkit} 方
法,它让数组下标和一个值进行与操作,去掉下标高位的1,将数组下标控制在
一定范围内,防止处理器在推测式执行中访问数组指定范围之外的数据。Linux
-构造了一个粒度更细的 array\_index\_nospec \supercite{linux-spec},它的
-功能如图\ref{fig:array-index-nospec}:
+使用了一个粒度更细的索引掩码\supercite{linux-spec},
+它的功能如图 \ref{fig:array-index-nospec} 中代码所示:
\begin{figure}[htbp]
\centering
@@ -206,7 +206,8 @@ Spectre 等攻击由暂态指令引起,为了定义 InvisiSpec 的攻击模型
源。根据这两类攻击,InvisiSpec 设计了两种模型模
型:Spectre 和 Futuristic.
-\begin{table}
+\begin{table}[htbp]
+\caption{暂态指令的来源}
\begin{tabular}{|c|c|}
\hline
攻击 & 暂态指令的来源\tabularnewline
@@ -227,7 +228,6 @@ Speculative Store Bypass & 装载指令和更早的存储指令地址别名\tabu
未来的攻击 & 异常、控制流预测错误、访存别名、一致性违例、中断等\tabularnewline
\hline
\end{tabular}
-\caption{暂态指令的来源}
\label{tab:transient_insn}
\centering
\end{table}
@@ -504,20 +504,20 @@ CSF 由以下几个关键部件组成:
\item 错误训练防御:用于保护分支预测器、返回地址栈等部件
\end{enumerate}
-\begin{table}
- \centering
+\begin{table}[htbp]
+\centering
+\caption{CSF 新定义的三种 fence}
\begin{tabular}{cccccc}
\hline
fence & 作用位置 & 严格/宽松 & 不允许的指令 & 防御的攻击种类\tabularnewline
\hline
LSQ-LFENCE & LSQ & 宽松 & 装载 & v1\tabularnewline
-\hline
+%\hline
LSQ-MFENCE & LSQ & 宽松 & 装载和存储 & v1,v1.1,v1.2\tabularnewline
-\hline
+%\hline
CFENCE & 缓存控制器 & 宽松 & 无 & v1\tabularnewline
\hline
\end{tabular}
-\caption{CSF 新定义的三种 fence}
\label{tab:csffence}
\centering
\end{table}
@@ -557,23 +557,23 @@ fence 操作的设计上有以下考虑:
存信道,如果指令 $j$ 不修改缓存的内容,则它对于缓存信道不具有安全依赖,
尽管它可能会通过其他信道泄露某些信息。
-\begin{table}
- \centering
-\begin{tabular}{|c|c|c|}
+\begin{table}[htbp]
+\centering
+\caption{Spectre 攻击中的安全依赖}
+\begin{tabular}{ccc}
\hline
Spectre 变体 & 指令 $i$ & 指令 $j$\tabularnewline
\hline
-\hline
+%\hline
Spectre v1 & 条件分支 & 访存\tabularnewline
-\hline
+%\hline
Spectre v2 & 间接转移 & 访存\tabularnewline
-\hline
+%\hline
Spectre v4 & 访存 & 访存\tabularnewline
-\hline
+%\hline
SpectrePrime & 条件分支 & 访存\tabularnewline
\hline
\end{tabular}
-\caption{Spectre 攻击中的安全依赖}
\label{tab:secdep}
\centering
\end{table}