Switchless Calls Made Practical in Intel SGX
Hongliang Tian, Qiong Zhang, Shoumeng Yan, A. G. Rudnitsky, Liron Shacham, Ron Yariv, Noam Milshten · 2018
Intel Software Guard Extensions (SGX) is an extension to x86 architecture that enables user-level code to create trusted memory regions, called enclaves. However, the security provided by enclaves is not free: one primary performance overhead is enclave switches, which are expensive and can be triggered frequently by cross-enclave function calls. Previous works propose a technique named Switchless Calls, which avoids enclave switches by using worker threads/cores to execute function calls asynchronously. But we find this technique is questionable in terms of efficiency: is it always wise to trade extra CPU cores for reduced enclave switches?