arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.12110cs.CRcs.AR
收藏

CacheSquash:让缓存具备推测感知能力

CacheSquash: Making caches speculation-aware

Hossam ElAtali, N. Asokan

AI总结:

本文提出CacheSquash机制,通过在推测指令被撤销时立即向缓存层次发送取消信号,阻止错误推测的内存访问改变缓存状态,从而以接近零的性能开销有效防御Spectre攻击。

摘要:

推测执行是实现高 CPU 性能的关键,但它也带来了 Spectre 攻击等风险,而这些风险在不产生显著性能开销的情况下仍然难以缓解。此类攻击通常分三个阶段展开:访问(access)、传输(transmit)和接收(receive)。通常,它们在传输和接收阶段利用缓存计时侧信道:推测性地访问敏感数据(访问),改变缓存状态(传输),然后利用缓存计时攻击(例如 Flush+Reload)提取秘密(接收)。我们的关键观察是,Spectre 攻击只需要传输指令执行并向缓存层次结构发出请求即可。它不需要在检测到错误预测(并撤销错误推测的指令)之前完成,因为在撤销之后到达缓存的内存响应仍然会改变缓存状态。我们提出一种新的缓解机制 CacheSquash,用于取消错误推测的内存访问。一旦发生撤销,取消信号就会立即发送到缓存层次结构,向下游传播,并阻止对尚未收到响应的缓存进行任何更改。这最大限度地减少了缓存状态的变化,从而降低了 Spectre 攻击成功的可能性。我们在 gem5 上实现了 CacheSquash,并表明它能够以接近零的性能开销挫败实际的 Spectre 攻击。

英文摘要:

Speculation is key to achieving high CPU performance, yet it enables risks like Spectre attacks which remain a significant challenge to mitigate without incurring substantial performance overheads. These attacks typically unfold in three stages: access, transmit, and receive. Typically, they exploit a cache timing side channel during the transmit and receive phases: speculatively accessing sensitive data (access), altering cache state (transmit), and then utilizing a cache timing attack (e.g., Flush+Reload) to extract the secret (receive). Our key observation is that Spectre attacks only require the transmit instruction to execute and dispatch a request to the cache hierarchy. It need not complete before a misprediction is detected (and mis-speculated instructions squashed) because responses from memory that arrive at the cache after squashing still alter cache state. We propose a novel mitigation, CacheSquash, that cancels mis-speculated memory accesses. Immediately upon squashing, a cancellation is sent to the cache hierarchy, propagating downstream and preventing any changes to caches that have not yet received a response. This minimizes cache state changes, thereby reducing the likelihood of Spectre attacks succeeding. We implement CacheSquash on gem5 and show that it thwarts practical Spectre attacks, with near-zero performance overheads.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑