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 条
  • [21] 64-bit servers: bits & pieces?
    Data Commun, 10 (85-88, 90):
  • [22] 64-bit server cooling requirements
    Copeland, D
    TWENTY-FIRST ANNUAL IEEE SEMICONDUCTOR THERMAL MEASUREMENT AND MANAGEMENT SYMPOSIUM, PROCEEDINGS 2005, 2005, : 94 - 98
  • [23] 64-bit computing & JVM performance
    Kyrylkov, S
    DR DOBBS JOURNAL, 2005, 30 (03): : 24 - 27
  • [24] 64-BIT PROGRAMMING IN A 32-BIT WORLD
    NICHOLSON, A
    DR DOBBS JOURNAL, 1993, 18 (01): : 34 - &
  • [25] Exploiting 64-bit parallelism - Responds
    Gutman, R
    DR DOBBS JOURNAL, 2000, 25 (12): : 10 - 10
  • [26] Implementation of a 64-bit Jackson Adder
    McAuley, Tynan
    Koven, William
    Carter, Andrew
    Ning, Paula
    Harris, David Money
    2013 ASILOMAR CONFERENCE ON SIGNALS, SYSTEMS AND COMPUTERS, 2013, : 1149 - 1154
  • [27] Leaps and bounds: Analyzing WebAssembly's performance with a focus on bounds checking
    Szewczyk, Raven
    Stonehouse, Kimberley
    Barbalace, Antonio
    Spink, Tom
    2022 IEEE INTERNATIONAL SYMPOSIUM ON WORKLOAD CHARACTERIZATION (IISWC 2022), 2022, : 256 - 268
  • [28] Making sense of 64-bit processors
    Brownstein, Mark
    Network Magazine, 2004, 19 (10): : 53 - 57
  • [29] Unix leads the 64-bit charge
    Lachal, L
    BYTE, 1996, 21 (11): : 139 - &
  • [30] Message authentication on 64-bit architectures
    Krovetz, Ted
    SELECTED AREAS IN CRYPTOGRAPHY, 2007, 4356 : 327 - 341