Lines Matching full:enclave

31  * about an enclave page. &enum sgx_secinfo_page_state specifies the
134 * Return the offset in the enclave where the TCS segment can be found.
152 * Return the offset in the enclave where the data segment can be found.
170 FIXTURE(enclave) { in FIXTURE() argument
188 TH_LOG("Failed to load the test enclave."); in setup_test_encl()
199 * An enclave consumer only must do this. in setup_test_encl()
246 TH_LOG("Failed to initialize the test enclave."); in setup_test_encl()
253 FIXTURE_SETUP(enclave) in FIXTURE_SETUP() argument
257 FIXTURE_TEARDOWN(enclave) in FIXTURE_TEARDOWN() argument
282 TEST_F(enclave, unclobbered_vdso) in TEST_F() argument
352 TEST_F(enclave, unclobbered_vdso_oversubscribed) in TEST_F() argument
383 TEST_F_TIMEOUT(enclave, unclobbered_vdso_oversubscribed_remove, 900)
397 * Create enclave with additional heap that is as big as all
402 TH_LOG("Creating an enclave with %lu bytes heap may take a while ...",
473 TH_LOG("Entering enclave to run EACCEPT for each page of %zd bytes may take a while ...",
494 TH_LOG("Removing %zd bytes from enclave may take a while ...",
504 TEST_F(enclave, clobbered_vdso) in TEST_F() argument
540 TEST_F(enclave, clobbered_vdso_and_user_function) in TEST_F() argument
574 TEST_F(enclave, tcs_entry) in TEST_F() argument
605 * This spans the local encl_buffer within the test enclave.
608 * the enclave and read back to ensure target page can be written to.
609 * 2) Change PTE permissions (RW -> RO) of target page within enclave.
612 * 4) Change PTE permissions of target page within enclave back to be RW.
613 * 5) Repeat (1) by resuming enclave, now expected to be possible to write to
614 * and read from target page within enclave.
616 TEST_F(enclave, pte_permissions) in TEST_F() argument
665 /* Change PTE permissions of target page within the enclave */ in TEST_F()
689 * Change PTE permissions back to enable enclave to write to the in TEST_F()
690 * target page and resume enclave - do not expect any exceptions this in TEST_F()
720 TEST_F(enclave, tcs_permissions) in TEST_F() argument
771 * Enclave page permission test.
773 * Modify and restore enclave page's EPCM (enclave) permissions from
774 * outside enclave (ENCLS[EMODPR] via kernel) as well as from within
775 * enclave (via ENCLU[EMODPE]). Check for page fault if
778 TEST_F(enclave, epcm_permissions) in TEST_F() argument
819 * within the enclave. in TEST_F()
881 * EPCM permissions changed from kernel, need to EACCEPT from enclave. in TEST_F()
898 * on EPCM when attempting to write to page from within enclave. in TEST_F()
914 * Received AEX but cannot return to enclave at same entrypoint, in TEST_F()
921 * Enter enclave at new TCS to change EPCM permissions to be in TEST_F()
973 * Test the addition of pages to an initialized enclave via writing to
974 * a page belonging to the enclave's address space but was not added
975 * during enclave creation.
977 TEST_F(enclave, augment) in TEST_F() argument
1001 * Actual enclave size is expected to be larger than the loaded in TEST_F()
1002 * test enclave since enclave size must be a power of 2 in bytes in TEST_F()
1012 * falls into the enclave's address range but not backed in TEST_F()
1013 * by existing enclave pages. in TEST_F()
1025 * Attempt to write to the new page from within enclave. in TEST_F()
1026 * Expected to fail since page is not (yet) part of the enclave. in TEST_F()
1028 * enclave, but since the new page needs an EACCEPT from within the in TEST_F()
1029 * enclave before it can be used it would not be possible in TEST_F()
1046 SKIP(return, "Kernel does not support adding pages to initialized enclave"); in TEST_F()
1104 * Test for the addition of pages to an initialized enclave via a
1107 TEST_F(enclave, augment_via_eaccept) in TEST_F() argument
1131 * Actual enclave size is expected to be larger than the loaded in TEST_F()
1132 * test enclave since enclave size must be a power of 2 in bytes while in TEST_F()
1138 * mmap() a page at end of existing enclave to be used for dynamic in TEST_F()
1142 * falls into the enclave's address range but not backed in TEST_F()
1143 * by existing enclave pages. in TEST_F()
1170 SKIP(return, "Kernel does not support adding pages to initialized enclave"); in TEST_F()
1180 * New page should be accessible from within enclave - attempt to in TEST_F()
1218 * type) in an initialized enclave and run a simple workload within it.
1224 TEST_F(enclave, tcs_create) in TEST_F() argument
1280 * Actual enclave size is expected to be larger than the loaded in TEST_F()
1281 * test enclave since enclave size must be a power of 2 in bytes while in TEST_F()
1287 * mmap() three pages at end of existing enclave to be used for the in TEST_F()
1319 SKIP(return, "Kernel does not support adding pages to initialized enclave"); in TEST_F()
1349 * Three new pages added to enclave. Now populate the TCS page with in TEST_F()
1350 * needed data. This should be done from within enclave. Provide in TEST_F()
1389 /* EACCEPT new TCS page from enclave. */ in TEST_F()
1453 * Enter enclave via TCS #1 and approve page removal by sending in TEST_F()
1507 * Enter enclave via TCS #1 and access location where TCS #3 was to in TEST_F()
1524 * New page should be accessible from within enclave - write to it. in TEST_F()
1558 * EACCEPT from within enclave but still attempts to finalize page removal
1560 * because the removal was not EACCEPTed from within the enclave.
1562 TEST_F(enclave, remove_added_page_no_eaccept) in TEST_F() argument
1600 * enclave. in TEST_F()
1671 * Request enclave page removal but instead of correctly following with
1672 * EACCEPT a read attempt to page is made from within the enclave.
1674 TEST_F(enclave, remove_added_page_invalid_access) in TEST_F() argument
1711 * enclave. in TEST_F()
1784 * Request enclave page removal and correctly follow with
1786 * to removed page is made from within the enclave.
1788 TEST_F(enclave, remove_added_page_invalid_access_after_eaccept) in TEST_F() argument
1826 * enclave. in TEST_F()
1913 TEST_F(enclave, remove_untouched_page) in TEST_F() argument
1965 * Enter enclave via TCS #1 and approve page removal by sending in TEST_F()