118 ms·
Strange, I skimmed through a few SGX code samples[1] and they're all C programs that pass data through an API rather than pointer passing. The article states th
by gruez 8y ago
Strange, I skimmed through a few SGX code samples[1] and they're all C programs that pass data through an API rather than pointer passing. The article states that they have access to all memory and it doesn't seem like Intel refuted it, so I guess we can assume it's true. That said, I find it strange that enclaves have access to all memory, when all it needs is access to its own protected region. If that's true, that seems like an oversight on Intel's part, especially since they already have well defined interfaces for passing data between trusted/untrusted code.
[1] https://github.com/digawp/hello-enclave https://github.com/digawp/hello-enclave
[1] https://software.intel.com/en-us/articles/sgx-intro-passing-data-between-app-and-enclave https://software.intel.com/en-us/articles/sgx-intro-passing-...
edit:
looks like the article might be mistaken. According to an article on SGX internals[2], SGX code may only access enclave memory. A similar diagram can be found in a slide deck [3].
[2] https://blog.quarkslab.com/overview-of-intel-sgx-part-1-sgx-internals.html https://blog.quarkslab.com/overview-of-intel-sgx-part-1-sgx-...
[3] http://cwfletcher.net/Content/598/lec04_sgx.pdf http://cwfletcher.net/Content/598/lec04_sgx.pdf page 26
- amluto 8y agoThe SDM is unambiguous: enclaves can access any memory that the host process can access. The enclave can also modify most of its callers registers, including RSP, RBP, and RIP. The Intel SDK uses these ability for reasons that might be considered unwise.