paperbot · PL 论文追踪

全部论文 待读 收藏

Safe Multi-site Binary Instrumentation of Running x86-64 Programs

安全地对运行中的 x86-64 程序进行多站点二进制插桩
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Jihun Baek, Sanghoon Han, Hyungon Moon
crossref: 2026-10-09

AI 速览

一句话:DIBE 在并发执行下安全地对运行中的 x86-64 程序进行多站点二进制修补,常见情况下无需陷入线程。

对运行中的 x86-64 进程做二进制插桩很难:变长指令与弱对齐使并发下的就地修改不安全。已有运行时方案要么每次覆盖都陷入线程,要么全局同步,扩展性受限。本文提出 DIBE:管理进程决定多站点修补策略与 trampoline 放置并导出元数据;目标进程内轻量运行时按保持中间状态正确的顺序重放编辑,安全地在活进程上激活 E9Patch 多站点重写。它用硬件原子原语完成 77–90% 覆盖,跨边界才回退 trap。在 28 个 SPEC CPU2006 基准和多进程 Nginx 上,插桩覆盖接近静态 E9Patch,几何平均执行开销差在 0.5% 内,单指令覆盖延迟低于微秒,持续负载下零 trap。

问题
如何在并发执行的运行中 x86-64 进程上安全地进行多站点二进制插桩,避免每次覆盖都 trap 或全局同步。
方法
DIBE 将决策与执行分离:管理进程生成修补策略与 trampoline 元数据,目标进程内运行时按依赖顺序用硬件原子原语重放覆盖,必要时以 trap 回退处理跨边界情况。
评估
在 28 个 SPEC CPU2006 基准、多进程 Nginx、运行中的 Chrome renderer 与内存安全检查器上评估插桩覆盖、执行开销、覆盖延迟和 trap 次数。
原文摘要(Abstract)

Applying binary instrumentation to a running x86-64 process is difficult because variable-length instructions and weak alignment guarantees prevent safe in-place code modification under concurrent execution. Existing run-time approaches either trap concurrent threads on every overwrite or require global synchronization, limiting scalability. This paper presents DIBE, a run-time binary editing framework that safely instruments running x86-64 programs without trapping in the common case. An admin process resolves all instrumentation decisions, including multi-site patching tactics and trampoline placement, and exports them as metadata. A lightweight runtime inside the target process replays these edits, safely activating E9Patch's multi-site rewriting tactics on the live process by applying their dependent overwrites in an order that keeps every intermediate program state correct under concurrent execution, a guarantee that single-site punning and offline rewriting do not provide. It applies 77-90% of overwrites using hardware atomic primitives invisible to concurrent threads, with a trap-based fallback only for the remaining cross-boundary cases. We evaluate DIBE on 28 SPEC CPU2006 benchmarks and a multi-process Nginx server, and demonstrate it at browser scale on a running Chrome renderer and as a live memory-safety checker. DIBE matches static E9Patch on both instrumentation coverage (near-complete) and execution time overhead (within 0.5% at the geometric mean), keeps per-instruction overwrite latency sub-microsecond, and records zero trap hits across all Nginx configurations under sustained load.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot12213,
  title = {Safe Multi-site Binary Instrumentation of Running x86-64 Programs},
  author = {Jihun Baek and Sanghoon Han and Hyungon Moon},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3837494}
}