Home
last modified time | relevance | path

Searched refs:seg (Results 1 – 8 of 8) sorted by relevance

/tools/testing/selftests/sgx/
Dload.c101 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()
[all …]
Dmain.c119 struct encl_segment *seg; in FIXTURE_SETUP() local
131 seg = &self->encl.segment_tbl[i]; in FIXTURE_SETUP()
133 TH_LOG("0x%016lx 0x%016lx 0x%02x", seg->offset, seg->size, seg->prot); in FIXTURE_SETUP()
146 struct encl_segment *seg = &self->encl.segment_tbl[i]; in FIXTURE_SETUP() local
148 addr = mmap((void *)self->encl.encl_base + seg->offset, seg->size, in FIXTURE_SETUP()
149 seg->prot, MAP_SHARED | MAP_FIXED, self->encl.fd, 0); in FIXTURE_SETUP()
Dsigstruct.c290 struct encl_segment *seg) in mrenclave_segment() argument
292 uint64_t end = seg->offset + seg->size; in mrenclave_segment()
295 for (offset = seg->offset; offset < end; offset += PAGE_SIZE) { in mrenclave_segment()
296 if (!mrenclave_eadd(ctx, offset, seg->flags)) in mrenclave_segment()
348 struct encl_segment *seg = &encl->segment_tbl[i]; in encl_measure() local
350 if (!mrenclave_segment(ctx, encl, seg)) in encl_measure()
/tools/testing/selftests/kvm/lib/x86_64/
Dsvm.c48 static void vmcb_set_seg(struct vmcb_seg *seg, u16 selector, in vmcb_set_seg() argument
51 seg->selector = selector; in vmcb_set_seg()
52 seg->attrib = attr; in vmcb_set_seg()
53 seg->limit = limit; in vmcb_set_seg()
54 seg->base = base; in vmcb_set_seg()
/tools/testing/selftests/bpf/progs/
Dtest_lwt_seg6local.c289 struct ip6_addr_t *seg; in __encap_srh() local
303 seg = (struct ip6_addr_t *)((char *)srh + sizeof(*srh)); in __encap_srh()
307 seg->lo = bpf_cpu_to_be64(4 - lo); in __encap_srh()
308 seg->hi = bpf_cpu_to_be64(hi); in __encap_srh()
309 seg = (struct ip6_addr_t *)((char *)seg + sizeof(*seg)); in __encap_srh()
/tools/lib/bpf/
Dlibbpf_internal.h301 #define for_each_btf_ext_sec(seg, sec) \ argument
302 for (sec = (seg)->info; \
303 (void *)sec < (seg)->info + (seg)->len; \
305 (seg)->rec_size * sec->num_info)
307 #define for_each_btf_ext_rec(seg, sec, i, rec) \ argument
310 i++, rec = (void *)rec + (seg)->rec_size)
Dbtf.c4646 const struct btf_ext_info *seg; in btf_ext_visit_type_ids() local
4650 seg = &btf_ext->func_info; in btf_ext_visit_type_ids()
4651 for_each_btf_ext_sec(seg, sec) { in btf_ext_visit_type_ids()
4654 for_each_btf_ext_rec(seg, sec, i, rec) { in btf_ext_visit_type_ids()
4661 seg = &btf_ext->core_relo_info; in btf_ext_visit_type_ids()
4662 for_each_btf_ext_sec(seg, sec) { in btf_ext_visit_type_ids()
4665 for_each_btf_ext_rec(seg, sec, i, rec) { in btf_ext_visit_type_ids()
4677 const struct btf_ext_info *seg; in btf_ext_visit_str_offs() local
4681 seg = &btf_ext->func_info; in btf_ext_visit_str_offs()
4682 for_each_btf_ext_sec(seg, sec) { in btf_ext_visit_str_offs()
[all …]
Dlibbpf.c5194 const struct btf_ext_info *seg; in bpf_object__relocate_core() local
5219 seg = &obj->btf_ext->core_relo_info; in bpf_object__relocate_core()
5220 for_each_btf_ext_sec(seg, sec) { in bpf_object__relocate_core()
5248 for_each_btf_ext_rec(seg, sec, i, rec) { in bpf_object__relocate_core()