Lines Matching refs:secinfo
62 struct sgx_secinfo secinfo; in sgx_encl_create() local
96 pginfo.metadata = (unsigned long)&secinfo; in sgx_encl_create()
98 memset(&secinfo, 0, sizeof(secinfo)); in sgx_encl_create()
172 static int sgx_validate_secinfo(struct sgx_secinfo *secinfo) in sgx_validate_secinfo() argument
174 u64 perm = secinfo->flags & SGX_SECINFO_PERMISSION_MASK; in sgx_validate_secinfo()
175 u64 pt = secinfo->flags & SGX_SECINFO_PAGE_TYPE_MASK; in sgx_validate_secinfo()
190 if (secinfo->flags & SGX_SECINFO_RESERVED_MASK) in sgx_validate_secinfo()
193 if (memchr_inv(secinfo->reserved, 0, sizeof(secinfo->reserved))) in sgx_validate_secinfo()
202 struct sgx_secinfo *secinfo, unsigned long src) in __sgx_encl_add_page() argument
223 pginfo.metadata = (unsigned long)secinfo; in __sgx_encl_add_page()
260 unsigned long offset, struct sgx_secinfo *secinfo, in sgx_encl_add_page() argument
268 encl_page = sgx_encl_page_alloc(encl, offset, secinfo->flags); in sgx_encl_add_page()
304 ret = __sgx_encl_add_page(encl, encl_page, epc_page, secinfo, in sgx_encl_add_page()
316 encl_page->type = (secinfo->flags & SGX_SECINFO_PAGE_TYPE_MASK) >> 8; in sgx_encl_add_page()
410 struct sgx_secinfo secinfo; in sgx_ioc_enclave_add_pages() local
427 if (copy_from_user(&secinfo, (void __user *)add_arg.secinfo, in sgx_ioc_enclave_add_pages()
428 sizeof(secinfo))) in sgx_ioc_enclave_add_pages()
431 if (sgx_validate_secinfo(&secinfo)) in sgx_ioc_enclave_add_pages()
446 &secinfo, add_arg.flags); in sgx_ioc_enclave_add_pages()
739 struct sgx_secinfo secinfo; in sgx_enclave_restrict_permissions() local
745 memset(&secinfo, 0, sizeof(secinfo)); in sgx_enclave_restrict_permissions()
746 secinfo.flags = modp->permissions & SGX_SECINFO_PERMISSION_MASK; in sgx_enclave_restrict_permissions()
782 ret = __emodpr(&secinfo, epc_virt); in sgx_enclave_restrict_permissions()
896 struct sgx_secinfo secinfo; in sgx_enclave_modify_types() local
911 memset(&secinfo, 0, sizeof(secinfo)); in sgx_enclave_modify_types()
913 secinfo.flags = page_type << 8; in sgx_enclave_modify_types()
984 ret = __emodt(&secinfo, epc_virt); in sgx_enclave_modify_types()
1094 struct sgx_secinfo secinfo; in sgx_encl_remove_pages() local
1100 memset(&secinfo, 0, sizeof(secinfo)); in sgx_encl_remove_pages()
1101 secinfo.flags = SGX_SECINFO_R | SGX_SECINFO_W | SGX_SECINFO_X; in sgx_encl_remove_pages()
1130 ret = __emodpr(&secinfo, epc_virt); in sgx_encl_remove_pages()