H. Tian, Qiong Zhang, Shoumeng Yan, Alex Rudnitsky, Liron Shacham, Ron Yariv, Noam Milshten
{"title":"在英特尔SGX中实现无交换机呼叫","authors":"H. Tian, Qiong Zhang, Shoumeng Yan, Alex Rudnitsky, Liron Shacham, Ron Yariv, Noam Milshten","doi":"10.1145/3268935.3268942","DOIUrl":null,"url":null,"abstract":"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? In this paper, we make Switchless Calls a practical technique by ensuring that it improves performance efficiently. To this end, we investigate on what conditions can Switchless Calls improve performance efficiently by establishing a performance model via both mathematical and simulation analysis. Then, we formulate the notion of worker efficiency and design an efficiency-based scheduling algorithm that can automatically adjust the number of workers in response to changing workloads. Guided by the insights obtained from our performance modeling and worker scheduling, we integrate Switchless Calls into Intel SGX SDK as an official feature. We evaluate the performance of our implementation in various benchmarks and the results demonstrate the practicality of Switchless Calls.","PeriodicalId":142419,"journal":{"name":"Proceedings of the 3rd Workshop on System Software for Trusted Execution","volume":"54 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-01-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"45","resultStr":"{\"title\":\"Switchless Calls Made Practical in Intel SGX\",\"authors\":\"H. Tian, Qiong Zhang, Shoumeng Yan, Alex Rudnitsky, Liron Shacham, Ron Yariv, Noam Milshten\",\"doi\":\"10.1145/3268935.3268942\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"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? In this paper, we make Switchless Calls a practical technique by ensuring that it improves performance efficiently. To this end, we investigate on what conditions can Switchless Calls improve performance efficiently by establishing a performance model via both mathematical and simulation analysis. Then, we formulate the notion of worker efficiency and design an efficiency-based scheduling algorithm that can automatically adjust the number of workers in response to changing workloads. Guided by the insights obtained from our performance modeling and worker scheduling, we integrate Switchless Calls into Intel SGX SDK as an official feature. We evaluate the performance of our implementation in various benchmarks and the results demonstrate the practicality of Switchless Calls.\",\"PeriodicalId\":142419,\"journal\":{\"name\":\"Proceedings of the 3rd Workshop on System Software for Trusted Execution\",\"volume\":\"54 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-01-15\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"45\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 3rd Workshop on System Software for Trusted Execution\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3268935.3268942\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 3rd Workshop on System Software for Trusted Execution","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3268935.3268942","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
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? In this paper, we make Switchless Calls a practical technique by ensuring that it improves performance efficiently. To this end, we investigate on what conditions can Switchless Calls improve performance efficiently by establishing a performance model via both mathematical and simulation analysis. Then, we formulate the notion of worker efficiency and design an efficiency-based scheduling algorithm that can automatically adjust the number of workers in response to changing workloads. Guided by the insights obtained from our performance modeling and worker scheduling, we integrate Switchless Calls into Intel SGX SDK as an official feature. We evaluate the performance of our implementation in various benchmarks and the results demonstrate the practicality of Switchless Calls.