An analysis of call-site patching without strong hardware support for self-modifying-code

With micro-services continuously gaining popularity and low-power processors making their way into data centers, efficient execution of managed runtime systems on low-power architectures is also gaining interest. Apart from the inherent performance differences between high and low power processors, porting a managed runtime system to a low-power architecture may result in spuriously introducing additional overheads and design trade-offs. In this work we investigate how the lack of strong hardware support for Self Modifying Code (SMC) in low-power architectures, influences Just-In-Time (JIT) compilation and execution in modern virtual machines. In particular, we examine how low-power architectures, with no or limited hardware support for SMC, impose restrictions on call-site implementations, when the latter need to be patchable by the runtime system. We present four different memory-safe implementations for call-site generation and discuss their advantages and disadvantages in the absence of strong hardware support for SMC. Finally, we evaluate each technique on different workloads using micro-benchmarks and we evaluate the best two techniques on the Dacapo benchmark suite showcasing performance differences up to 15%.

[1]  Mikel Luján,et al.  Heterogeneous Managed Runtime Systems: A Computer Vision Case Study , 2017, VEE.

[2]  Beng Chin Ooi,et al.  A Performance Study of Big Data on Small Nodes , 2015, Proc. VLDB Endow..

[3]  Alex Ramírez,et al.  The low-power architecture approach towards exascale computing , 2011, ScalA '11.

[4]  Per Larsen,et al.  Librando: transparent code randomization for just-in-time compilers , 2013, CCS.

[5]  Michael Haupt,et al.  Maxine: An approachable virtual machine for, and in, java , 2013, TACO.

[6]  Koen De Bosschere,et al.  A Model for Self-Modifying Code , 2006, Information Hiding.

[7]  Yong Meng Teo,et al.  On understanding the energy consumption of ARM-based multicore servers , 2013, SIGMETRICS '13.

[8]  David Naccache,et al.  Can Code Polymorphism Limit Information Leakage? , 2011, WISTP.

[9]  Yunsup Lee,et al.  The RISC-V Instruction Set Manual , 2014 .

[10]  Lorenzo Cavallaro,et al.  SoK: Using Dynamic Binary Instrumentation for Security (And How You May Get Caught Red Handed) , 2019, AsiaCCS.

[11]  François-Xavier Standaert,et al.  Shuffling against Side-Channel Attacks: A Comprehensive Study with Cautionary Note , 2012, ASIACRYPT.

[12]  Magnus O. Myreen Verified just-in-time compiler on x86 , 2010, POPL '10.

[13]  Sotiris Ioannidis,et al.  Rage against the virtual machine: hindering dynamic analysis of Android malware , 2014, EuroSec '14.

[14]  Bart Preneel,et al.  A taxonomy of self-modifying code for obfuscation , 2011, Comput. Secur..

[15]  No License,et al.  Intel ® 64 and IA-32 Architectures Software Developer ’ s Manual Volume 3 A : System Programming Guide , Part 1 , 2006 .

[16]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.