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 条
  • [31] SOI implementation of a 64-bit adder
    Tran, J.V.
    Mounes-Toussi, F.
    Storino, S.N.
    Stasiak, D.L.
    Proceedings - IEEE International Conference on Computer Design: VLSI in Computers and Processors, 1999, : 573 - 574
  • [32] A 64-bit strong alternating code discovered
    Markkanen, M
    Nygren, T
    RADIO SCIENCE, 1996, 31 (02) : 241 - 243
  • [33] PERSONAL SUPERCOMPUTING VIRTUAL MEMORY, 64-BIT
    HIRSCHSOHN, I
    DR DOBBS JOURNAL, 1992, 17 (08): : 50 - &
  • [34] 64-bit operating systems enter the mainstream
    Neal, Mike
    Scientific Computing, 2007, 24 (03): : 22 - 24
  • [35] SPIM - A PIPELINED 64 X 64-BIT ITERATIVE MULTIPLIER
    SANTORO, MR
    HOROWITZ, MA
    IEEE JOURNAL OF SOLID-STATE CIRCUITS, 1989, 24 (02) : 487 - 493
  • [36] 64-bit CFD aids Rover, VW
    不详
    MECHANICAL ENGINEERING, 1999, 121 (11) : 22 - 22
  • [37] 64-BIT MONOLITHIC FLOATING POINT PROCESSORS
    WARE, FA
    MCALLISTER, WH
    CARLSON, JR
    SUN, DK
    VLACH, RJ
    IEEE JOURNAL OF SOLID-STATE CIRCUITS, 1982, 17 (05) : 898 - 907
  • [38] 64-BIT SHIFT REGISTER CAN BE PROGRAMMED
    COZER, C
    ELECTRONICS, 1983, 56 (13): : 153 - 153
  • [39] Efficient Memory Shadowing for 64-bit Architectures
    Zhao, Qin
    Bruening, Derek
    Amarasinghe, Saman
    ACM SIGPLAN NOTICES, 2010, 45 (08) : 93 - 102
  • [40] Index compression using 64-bit words
    Anh, Vo Ngoc
    Moffat, Alistair
    SOFTWARE-PRACTICE & EXPERIENCE, 2010, 40 (02): : 131 - 147