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 条
  • [11] Intel 64-bit processors
    Gustin, Veselko
    ELEKTROTEHNISKI VESTNIK-ELECTROCHEMICAL REVIEW, 2007, 74 (04): : 201 - 206
  • [12] Compilers for 64-bit alpha
    Performance Computing/Unix Review, 1998, 16 (11):
  • [13] UNIX ON 64-BIT ARCHITECTURES
    FORYS, J
    ROSA, C
    IKEDA, H
    NEC RESEARCH & DEVELOPMENT, 1995, 36 (02): : 312 - 324
  • [14] Integer 64-bit optimizations
    Kuznetsov, A
    DR DOBBS JOURNAL, 2005, 30 (03): : 36 - 38
  • [15] The real 64-bit OS
    Munroe, SJ
    BYTE, 1997, 22 (01): : 19 - 19
  • [16] Exploiting 64-Bit parallelism
    Gutman, R
    DR DOBBS JOURNAL, 2000, 25 (09): : 133 - +
  • [17] 64-bit takes off
    McLeod, Ramon G.
    PC World (San Francisco, CA), 2003, 21 (11): : 26 - 34
  • [18] 64-bit computing & DSPs
    Oureshi, S
    DR DOBBS JOURNAL, 2005, 30 (03): : 78 - +
  • [19] 64-bit workstation accelerates processing
    Deitz, D
    MECHANICAL ENGINEERING, 1996, 118 (04) : 20 - &
  • [20] VENDORS RALLY FOR 64-BIT UNIX
    ANDREWS, D
    BYTE, 1995, 20 (11): : 47 - 47