Performant Bounds Checking for 64-Bit WebAssembly

被引:0
|
作者
Doellerer, Lukas [1 ]
Engelke, Alexis [1 ]
机构
[1] Tech Univ Munich, Munich, Germany
关键词
WebAssembly; Bounds Checking; 64-bit; Virtual Memory; Memory Protection Keys;
D O I
10.1145/3689490.3690400
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
WebAssembly is becoming increasingly popular for various use cases due to its high portability, strict and easily enforceable isolation, and its comparably low run-time overhead. For determinism and security, WebAssembly guarantees that accesses to unallocated memory inside the 32-bit address space produce a trap. Typically, runtimes implement this by reserving all addressable WebAssembly memory in the host virtual memory and relying on page faults for out-of-bounds accesses. To accommodate programs with higher memory requirements, several execution runtimes also implement a 64-bit address space. However, bounds checking solely relying on virtual memory protection cannot be easily extended for 64 bits. Thus, popular runtimes resort to traditional bounds checks in software, which are required frequently and, therefore, incur a substantial run-time overhead. In this paper, we explore different ways to lower the bounds checking overhead for 64-bit WebAssembly using virtual memory techniques provided by modern hardware. In particular, we implement and analyze approaches using a combination of software checks and virtual memory, using two-level guard pages, and using unprivileged memory protection mechanisms like x86-64 memory keys. Our results show that we can reduce the bounds checking overhead from more than 100% when using software bounds checks to only 12.7% using two-level guard pages.
引用
收藏
页码:23 / 31
页数:9
相关论文
共 50 条
  • [1] 64-bit players
    Donelan, J
    COMPUTER GRAPHICS WORLD, 2004, 27 (03) : 30 - +
  • [2] 64-bit computing
    Halpern, M
    COMPUTER-AIDED ENGINEERING, 1996, 15 (06): : 80 - 80
  • [3] 64-BIT COMPUTING
    MASHEY, JR
    BYTE, 1991, 16 (09): : 135 - &
  • [4] The 64-bit question
    Bunn, Simon
    e.nz magazine, 2003, 4 (03):
  • [5] Microsoft and 64-bit NT
    不详
    DATAMATION, 1996, 42 (13): : 11 - 11
  • [6] Graphics & the 64-bit world
    Pournelle, J
    DR DOBBS JOURNAL, 2005, 30 (11): : 78 - 79
  • [7] Intel 64-bit processors
    Guštin, Veselko
    Elektrotehniski Vestnik/Electrotechnical Review, 2007, 74 (04): : 201 - 206
  • [8] The 64-bit universal RNG
    Marsaglia, G
    Tsang, WW
    STATISTICS & PROBABILITY LETTERS, 2004, 66 (02) : 183 - 187
  • [9] Exploiting 64-bit parallelism
    Bagwell, P
    DR DOBBS JOURNAL, 2000, 25 (11): : 10 - 10
  • [10] THE BASICS OF 64-BIT COMPUTING
    Svetic, Sandi
    Sok, Antun
    ENGINEERING REVIEW, 2008, 28 (02) : 119 - 130