corda/psw
Sean Christopherson 14c19edaaf Clean up build_sections and build_mem_region code
Modify build_mem_region to support an unaligned starting address.  This
makes it symmetrical with regard to starting and ending partial pages;
previously, build_mem_region only support partial pages at the end of a
section (caller was responsible for handling the first page).  Remove
the edge case handling of the first page from build_sections now that
build_mem_region does not have alignment restrictions.

Change the section_info_t parameter in build_mem_region to be a const
reference to eliminate any need to check for a null pointer.

Make the raw_data pointer in section_info_t const, as the source file's
data should never be modified.  This is currently cast away via GET_PTR
in build_pages when calling into add_enclave_page; the add_enclave_page
flow can be modified by a future commit to retain the const modifier.

Add two utilities, is_relocation_page and build_partial_page, to reduce
copy-paste code.

Add PAGE_OFFSET macro to calculate the offset within a page.

Assert on address/size alignment in build_pages and build_context to
document expected alignment and catch any related code bugs.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
2016-09-26 13:46:38 -07:00
..
ae Upgrade to Linux 1.6 gold release 2016-09-19 14:55:22 +08:00
uae_service Upgrade to Linux 1.6 gold release 2016-09-19 14:55:22 +08:00
urts Clean up build_sections and build_mem_region code 2016-09-26 13:46:38 -07:00
Makefile Initial release of Intel SGX for Linux. 2016-06-23 18:51:53 -04:00