From e943447fdb92176bd2a551e0bc5e98e45b08820d Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Sun, 5 May 2019 13:42:29 +0800 Subject: update --- chap/chap3.tex | 12 ++++++++++++ chap/chap4.tex | 17 ++++++++++++++--- thesis.bib | 8 ++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/chap/chap3.tex b/chap/chap3.tex index 9ed3df5..742d095 100644 --- a/chap/chap3.tex +++ b/chap/chap3.tex @@ -137,6 +137,18 @@ Conditional Speculation\supercite{conditional-speculation} 是一种检测 在 gem5 模拟器中用 SPEC CPU2006 进行评测,平均性能开销为 6.8\%. +\subsubsection{SpectreGuard} + +SpectreGuard\supercite{spectreguard} 是一种软硬件结合防御 Spectre 攻击 +的方法。软件在页表中标记一个页是否存在秘密数据,如果一条指令在推测式执 +行中读取了带标记的页中的数据,处理器则禁止这条指令将读取的值转发至其他 +指令,直到这条指令之前的所有预测都已验证,确认推测式执行正确。 + +在 gem5 模拟器中用 SPEC CPU2006 评测,如果标记内存的所有页,则 +SpectreGuard 的平均性能开销为 20\%, 而如果标记堆区域,则性能开销减少至 +8\%. 在使用 OpenSSL 的合成基准测试中,如果只标记私钥为秘密数据,则性能 +可以接近原处理器的性能。 + % \begin{comment} % % MI6: Secure Enclave in a Speculative Out-of-Order processor diff --git a/chap/chap4.tex b/chap/chap4.tex index 90ab366..406655a 100644 --- a/chap/chap4.tex +++ b/chap/chap4.tex @@ -30,9 +30,20 @@ CSF\supercite{context-sensitive-fencing} 中的译码级信息流追踪框架 DI 断是否需要插入 fence 微码。OISA\supercite{oisa} 在指令系统的定义中即包 含了 DIFT 技术,用于追踪一个数据是否为秘密数据。 -本文使用 DIFT 检测 Spectre 组件中泄露数据的 load 指令。 - -%TODO +本文使用 DIFT 检测 Spectre 组件中泄露数据的 load 指令。详细设计如下: + +\begin{itemize} +\item 为每个物理寄存器添加一位标记,表示这个寄存器的数据是否来自于推测 + 式执行中从内存读取的数据 +\item 如果在推测式执行中,一条指令从内存中读取了数据,则设置这条指令的 + 目的寄存器的标志为1 +\item 对于非访存指令,如果存在标记为1的源寄存器,则设置这条指令的目的 + 寄存器标志为1,否则设置标志为0 +\item 当一条指令之前所有分支指令执行完成,确认推测式执行正确后,设置这 + 条指令的目的寄存器标志为0 +\item 在推测式执行的过程中执行 load 指令时,如果存在标记为1的源寄存器, + 则这条指令为不安全的 load +\end{itemize} \section{InvisiSpec的详细设计} diff --git a/thesis.bib b/thesis.bib index 3ec7724..3db1a1f 100644 --- a/thesis.bib +++ b/thesis.bib @@ -394,6 +394,14 @@ This thesis highlights two aspects of the BOOM design: its industry-competitive ISSN={2378-203X}, month=Feb,} +@inproceedings{spectreguard, + title={SpectreGuard : An Efficient Data-centric Defense Mechanism against Spectre Attacks}, + author={Jacob Fustos and Farzad Farshchi and Heechul Yun}, + year={2019}, + booktitle = {Proceedings of the 56th Annual Design Automation Conference}, + series = {DAC '19}, +} + % looks useful... @INPROCEEDINGS{poisonivy, author={T. S. {Lehman} and A. D. {Hilton} and B. C. {Lee}}, -- cgit v1.2.3