Searched refs:encl (Results 1 – 4 of 4) sorted by relevance
/tools/testing/selftests/sgx/ |
D | load.c | 22 void encl_delete(struct encl *encl) in encl_delete() argument 24 if (encl->encl_base) in encl_delete() 25 munmap((void *)encl->encl_base, encl->encl_size); in encl_delete() 27 if (encl->bin) in encl_delete() 28 munmap(encl->bin, encl->bin_size); in encl_delete() 30 if (encl->fd) in encl_delete() 31 close(encl->fd); in encl_delete() 33 if (encl->segment_tbl) in encl_delete() 34 free(encl->segment_tbl); in encl_delete() 36 memset(encl, 0, sizeof(*encl)); in encl_delete() [all …]
|
D | main.h | 16 struct encl { struct 33 void encl_delete(struct encl *ctx); argument 34 bool encl_load(const char *path, struct encl *encl); 35 bool encl_measure(struct encl *encl); 36 bool encl_build(struct encl *encl);
|
D | main.c | 111 struct encl encl; in FIXTURE() local 125 if (!encl_load("test_encl.elf", &self->encl)) { in FIXTURE_SETUP() 126 encl_delete(&self->encl); in FIXTURE_SETUP() 130 for (i = 0; i < self->encl.nr_segments; i++) { in FIXTURE_SETUP() 131 seg = &self->encl.segment_tbl[i]; in FIXTURE_SETUP() 136 if (!encl_measure(&self->encl)) in FIXTURE_SETUP() 139 if (!encl_build(&self->encl)) in FIXTURE_SETUP() 145 for (i = 0; i < self->encl.nr_segments; i++) { in FIXTURE_SETUP() 146 struct encl_segment *seg = &self->encl.segment_tbl[i]; in FIXTURE_SETUP() 148 addr = mmap((void *)self->encl.encl_base + seg->offset, seg->size, in FIXTURE_SETUP() [all …]
|
D | sigstruct.c | 289 static bool mrenclave_segment(EVP_MD_CTX *ctx, struct encl *encl, in mrenclave_segment() argument 299 if (!mrenclave_eextend(ctx, offset, encl->src + offset)) in mrenclave_segment() 306 bool encl_measure(struct encl *encl) in encl_measure() argument 310 struct sgx_sigstruct *sigstruct = &encl->sigstruct; in encl_measure() 344 if (!mrenclave_ecreate(ctx, encl->src_size)) in encl_measure() 347 for (i = 0; i < encl->nr_segments; i++) { in encl_measure() 348 struct encl_segment *seg = &encl->segment_tbl[i]; in encl_measure() 350 if (!mrenclave_segment(ctx, encl, seg)) in encl_measure()
|