arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.11696cs.CR
收藏

关于条件跳转指令的异常执行时间

On Abnormal Execution Timing of Conditional Jump Instructions

Ruhr University Bochum(波鸿鲁尔大学);NEC Laboratories Europe(NEC欧洲实验室);GMV Spain(GMV西班牙)

Annika Wilde, Samira Briongos, Claudio Soriente, Ghassan Karame

AI总结:

本文研究了条件跳转指令的执行时间异常,发现其源于微操作缓存和指令缓存的位置,通过32字节对齐可避免该问题,同时发现其可作为隐蔽信道用于高吞吐量传输。

摘要:

现代计算架构的大量研究显示,指令的执行时间可以(i)依赖于指令的操作数,或者(ii)受到系统优化的影响,例如分支预测和推测执行范式。在本文中,我们系统地测量和分析了可以在前一条指令后宏融合的条件跳转指令的执行时间变化,这取决于它们在二进制中的位置。我们的测量结果表明,这些执行时间的变化源于微操作缓存的放置以及跳转的偏移量在现代处理器L1指令缓存中的位置。我们证明这种行为在多个微架构中保持一致,包括Skylake、Coffee Lake和Kaby Lake,以及各种实际实现。我们通过在大量流行的二进制文件上进行广泛的实验,确认了这种变化的普遍性,包括Ubuntu 24.04、Windows 10 Pro和几个开源加密库的库文件。我们还展示了通过确保宏融合指令对齐32字节,可以轻松避免这种执行时间变化——这种方法最初由Intel在2019年的一份被忽视的短报告中提出。我们量化了这种方法在加密库中的性能影响,显示在避免执行时间变化时,平均加速了2.15%(最高可达10.54%)。作为附带结果,我们展示了这种变化可以被用作隐蔽信道,实现最大吞吐量16.14 Mbps。

英文摘要:

An extensive line of work on modern computing architectures has shown that the execution time of instructions can (i) depend on the operand of the instruction or (ii) be influenced by system optimizations, e.g., branch prediction and speculative execution paradigms. In this paper, we systematically measure and analyze timing variabilities in conditional jump instructions that can be macro-fused with a preceding instruction, depending on their placement within the binary. Our measurements indicate that these timing variations stem from the micro-op cache placement and the jump's offset in the L1 instruction cache of modern processors. We demonstrate that this behavior is consistent across multiple microarchitectures, including Skylake, Coffee Lake, and Kaby Lake, as well as various real-world implementations. We confirm the prevalence of this variability through extensive experiments on a large-scale set of popular binaries, including libraries from Ubuntu 24.04, Windows 10 Pro, and several open-source cryptographic libraries. We also show that one can easily avoid this timing variability by ensuring that macro-fusible instructions are 32-byte aligned - an approach initially suggested in 2019 by Intel in an overlooked short report. We quantify the performance impact of this approach across the cryptographic libraries, showing a speedup of 2.15% on average (and up to 10.54%) when avoiding the timing variability. As a by-product, we show that this variability can be exploited as a covert channel, achieving a maximum throughput of 16.14 Mbps.

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

↑