keystone-enclave / riscv-pk

Security monitor for Keystone Enclave (mirror of riscv-pk). Will be deprecated when openSBI port is ready
Other
36 stars 14 forks source link

TOR PMP regions support for CMA enclave memory #26

Closed dayeol closed 5 years ago

dayeol commented 5 years ago

In order to support CMA-allocated enclave memory, the SM is now aware of how to handle TOR PMP regions. It just finds two sequential empty PMP entries and use them for a TOR region. SM does not make any intelligent decision, such as merging two continuous memory. I think it is okay for now since we mostly run a few enclaves.

dayeol commented 5 years ago

Plus, it solves #23

dayeol commented 5 years ago

@dkohlbre I have tested this with both CMA-enabled and CMA-disabled settings, with both aligned and non-aligned addresses. Please take a quick look and please let me know if there's any obvious bug.