Lines Matching refs:seg
101 static bool encl_ioc_add_pages(struct encl *encl, struct encl_segment *seg) in encl_ioc_add_pages() argument
108 secinfo.flags = seg->flags; in encl_ioc_add_pages()
110 ioc.src = (uint64_t)encl->src + seg->offset; in encl_ioc_add_pages()
111 ioc.offset = seg->offset; in encl_ioc_add_pages()
112 ioc.length = seg->size; in encl_ioc_add_pages()
196 struct encl_segment *seg; in encl_load() local
201 seg = &encl->segment_tbl[j]; in encl_load()
220 seg->prot = PROT_READ | PROT_WRITE; in encl_load()
221 seg->flags = SGX_PAGE_TYPE_TCS << 8; in encl_load()
223 seg->prot = (phdr->p_flags & PF_R) ? PROT_READ : 0; in encl_load()
224 seg->prot |= (phdr->p_flags & PF_W) ? PROT_WRITE : 0; in encl_load()
225 seg->prot |= (phdr->p_flags & PF_X) ? PROT_EXEC : 0; in encl_load()
226 seg->flags = (SGX_PAGE_TYPE_REG << 8) | seg->prot; in encl_load()
229 seg->offset = (phdr->p_offset & PAGE_MASK) - src_offset; in encl_load()
230 seg->size = (phdr->p_filesz + PAGE_SIZE - 1) & PAGE_MASK; in encl_load()
291 struct encl_segment *seg = &encl->segment_tbl[i]; in encl_build() local
293 if (!encl_ioc_add_pages(encl, seg)) in encl_build()