Stress-SGX: Load and Stress your Enclaves for Fun and Profit

T hi s is a po st -p ee rre vi ew ,p re -c op ye di t ve rs io n of an ar ti cl e pu bl is he d in “N et w or ke d Sy st em s” .T he fin al au th en ti ca te d ve rs io n is av ai la bl e on lin e at ht tp s: // do i.o rg /1 0. 10 07 /9 78 -3 -0 30 -0 55 29 -5 _ 24 . The latest generation of Intel processors supports Software Guard Extensions (SGX), a set of instructions that implements a Trusted Execution Environment (TEE) right inside the CPU, by means of socalled enclaves. This paper presents Stress-SGX, an easy-to-use stresstest tool to evaluate the performance of SGX-enabled nodes. We build on top of the popular Stress-ng tool, while only keeping the workload injectors (stressors) that are meaningful in the SGX context. We report on several insights and lessons learned about porting legacy code to run inside an SGX enclave, as well as the limitations introduced by this process. Finally, we use Stress-SGX to conduct a study comparing the performance of different SGX-enabled machines.