Home
last modified time | relevance | path

Searched refs:ADD_OVERFLOW (Results 1 – 25 of 40) sorted by relevance

12

/optee_os-3.20.0/core/pta/tests/
A Dmisc.c31 if (ADD_OVERFLOW(8U, 0U, &r_s32)) in self_test_add_overflow()
35 if (ADD_OVERFLOW(32U, 30U, &r_u32)) in self_test_add_overflow()
39 if (!ADD_OVERFLOW(UINT32_MAX, UINT32_MAX, &r_u32)) in self_test_add_overflow()
52 if (ADD_OVERFLOW((int32_t)30, (int32_t)-31, &r_s32)) in self_test_add_overflow()
61 if (ADD_OVERFLOW(INT32_MIN + 1, -1, &r_s32)) in self_test_add_overflow()
65 if (!ADD_OVERFLOW(INT32_MIN, -1, &r_s32)) in self_test_add_overflow()
67 if (!ADD_OVERFLOW(INT32_MIN + 1, -2, &r_s32)) in self_test_add_overflow()
69 if (!ADD_OVERFLOW(INT32_MAX, INT32_MAX, &r_s32)) in self_test_add_overflow()
71 if (ADD_OVERFLOW(INT32_MAX, INT32_MAX, &r_u32)) in self_test_add_overflow()
73 if (!ADD_OVERFLOW(INTMAX_MAX, INTMAX_MAX, &r_sm)) in self_test_add_overflow()
[all …]
/optee_os-3.20.0/core/include/
A Dsigned_hdr.h57 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size()
58 ADD_OVERFLOW(s, shdr->sig_size, &s)) in shdr_get_size()
173 if (ADD_OVERFLOW(s, ehdr->iv_size, &s) || in shdr_enc_get_size()
174 ADD_OVERFLOW(s, ehdr->tag_size, &s)) in shdr_enc_get_size()
/optee_os-3.20.0/core/crypto/
A Dsigned_hdr.c28 if (ADD_OVERFLOW(offs, sizeof(struct shdr), &end) || end > img_size) in shdr_alloc_and_copy()
32 if (ADD_OVERFLOW(offs, shdr_size, &end) || end > img_size) in shdr_alloc_and_copy()
35 if (ADD_OVERFLOW(img_va, shdr_size, &tmp)) in shdr_alloc_and_copy()
173 ADD_OVERFLOW(end, sizeof(*subkey), &end) || in check_attrs()
178 if (ADD_OVERFLOW(attrs[n].offs, attrs[n].size, &end) || in check_attrs()
264 if (ADD_OVERFLOW(shdr->img_size, offs, &end) || end > ns_img_size) in shdr_load_pub_key()
304 if (ADD_OVERFLOW(key->name_size, offs + shdr->img_size, &end) || in shdr_load_pub_key()
/optee_os-3.20.0/ta/pkcs11/src/
A Dserializer.c48 if (ADD_OVERFLOW(buf0_sz, size, &sz)) in alloc_and_get()
86 if (ADD_OVERFLOW((vaddr_t)args->next, size, &next_end)) in serialargs_get_ptr()
181 if (ADD_OVERFLOW(*blen, len, &nlen)) in serialize()
A Dsanitize_object.c58 if (ADD_OVERFLOW(*pos, sizeof(*attr), &data_pos) || data_pos > blen) in read_attr_advance()
62 if (ADD_OVERFLOW(data_pos, attr->size, &next_pos) || next_pos > blen) in read_attr_advance()
265 if (ADD_OVERFLOW(sizeof(head), head.attrs_size, &sz_from_hdr) || in sanitize_client_object()
/optee_os-3.20.0/core/kernel/
A Dree_fs_ta.c296 if (ADD_OVERFLOW(offs, shdr->img_size, &offs) || in ree_fs_ta_open()
297 ADD_OVERFLOW(offs, pub_key.name_size, &offs) || in ree_fs_ta_open()
380 if (ADD_OVERFLOW(sz, sizeof(*bs_hdr), &sz) || ta_size < sz) { in ree_fs_ta_open()
418 if (ADD_OVERFLOW(sz, sizeof(struct shdr_bootstrap_ta), &sz) || in ree_fs_ta_open()
419 ADD_OVERFLOW(sz, sizeof(img_ehdr), &sz) || in ree_fs_ta_open()
428 if (!ehdr_sz || ADD_OVERFLOW(sz, ehdr_sz, &sz) || in ree_fs_ta_open()
554 if (ADD_OVERFLOW(handle->offs, len, &next_offs) || in ree_fs_ta_read()
763 if (ADD_OVERFLOW(handle->offs, len, &next_offs) || in buf_ta_read()
A Dmsg_param.c126 if (ADD_OVERFLOW(size, page_offset, &size_plus_offs)) in msg_param_mobj_from_noncontig()
A Dldelf_syscalls.c75 if (ADD_OVERFLOW(va, sz, &end_va)) in ldelf_syscall_unmap()
231 if (ADD_OVERFLOW(offs_bytes, num_bytes, &next_offs)) in binh_copy_to()
478 if (ADD_OVERFLOW(va, sz, &end_va)) in ldelf_syscall_set_prot()
A Dembedded_ts.c127 if (ADD_OVERFLOW(h->offs, len, &next_offs) || in read_uncompressed()
/optee_os-3.20.0/core/tee/
A Dtee_svc_storage.c110 if (ADD_OVERFLOW(sizeof(head), head.attr_size, &tmp)) { in tee_svc_storage_read_head()
713 if (ADD_OVERFLOW(o->info.dataPosition, len, &pos_tmp)) { in syscall_storage_obj_read()
726 if (ADD_OVERFLOW(o->ds_pos, o->info.dataPosition, &pos_tmp)) { in syscall_storage_obj_read()
770 if (ADD_OVERFLOW(o->info.dataPosition, len, &pos_tmp)) { in syscall_storage_obj_write()
782 if (ADD_OVERFLOW(o->ds_pos, o->info.dataPosition, &pos_tmp)) { in syscall_storage_obj_write()
829 if (ADD_OVERFLOW(sizeof(struct tee_svc_storage_head), attr_size, in syscall_storage_obj_trunc()
834 if (ADD_OVERFLOW(len, off, &off)) { in syscall_storage_obj_trunc()
876 if (ADD_OVERFLOW(o->info.dataPosition, offset, &new_pos)) in syscall_storage_obj_seek()
880 if (ADD_OVERFLOW(o->info.dataSize, offset, &new_pos)) in syscall_storage_obj_seek()
A Dentry_std.c90 if (ADD_OVERFLOW(mem->offs, mem->size, &req_size) || in set_fmem_param()
163 if (ADD_OVERFLOW(mem->offs, mem->size, &req_size) || in set_rmem_param()
/optee_os-3.20.0/core/mm/
A Dvm.c76 if (ADD_OVERFLOW(prev_reg->va, prev_reg->size, &begin_va) || in select_va_in_range()
77 ADD_OVERFLOW(begin_va, pad_begin, &begin_va) || in select_va_in_range()
78 ADD_OVERFLOW(begin_va, pad, &begin_va) || in select_va_in_range()
98 if (ADD_OVERFLOW(begin_va, reg->size, &end_va) || in select_va_in_range()
99 ADD_OVERFLOW(end_va, pad_end, &end_va) || in select_va_in_range()
100 ADD_OVERFLOW(end_va, pad, &end_va) || in select_va_in_range()
394 if (ADD_OVERFLOW(va, len, &end_va)) in va_range_is_contiguous()
462 if (ADD_OVERFLOW(va, len, &end_va)) in split_vm_range()
503 if (ADD_OVERFLOW(va, len, &end_va)) in merge_vm_range()
831 if (ADD_OVERFLOW(va, l, &end_va)) in vm_unmap()
[all …]
A Dfile.c97 ADD_OVERFLOW(page_offset, fse->slice.fobj->num_pages, &s)) { in file_add_slice()
/optee_os-3.20.0/ldelf/
A Dta_elf_rel.c363 if (ADD_OVERFLOW(shdr[sym_tab_idx].sh_addr, in e32_relocate()
383 if (ADD_OVERFLOW(shdr[str_tab_idx].sh_addr, in e32_relocate()
397 if (ADD_OVERFLOW(shdr[rel_sidx].sh_addr, in e32_relocate()
603 if (ADD_OVERFLOW(shdr[sym_tab_idx].sh_addr, in e64_relocate()
623 if (ADD_OVERFLOW(shdr[str_tab_idx].sh_addr, in e64_relocate()
637 if (ADD_OVERFLOW(shdr[rel_sidx].sh_addr, in e64_relocate()
A Dta_elf.c198 if (ADD_OVERFLOW(addr, memsz, &max_addr)) in check_phdr_in_range()
235 if (ADD_OVERFLOW((vaddr_t)ptr, sz, &max_addr)) in check_range()
259 if (ADD_OVERFLOW(num_words, num_buckets, &num_words) || in check_hashtab()
260 ADD_OVERFLOW(num_words, num_chains, &num_words) || in check_hashtab()
287 if (ADD_OVERFLOW(num_words, h->nbuckets, &num_words) || in check_gnu_hashtab()
288 ADD_OVERFLOW(num_words, bloom_words, &num_words) || in check_gnu_hashtab()
514 ADD_OVERFLOW(sz, elf->e_phoff, &sz)) in init_elf()
633 assert(!ADD_OVERFLOW(seg->vaddr, seg->memsz, &dummy)); in adjust_segments()
/optee_os-3.20.0/lib/libutils/ext/include/
A Dutil.h56 ADD_OVERFLOW((v), __roundup_mask, &__roundup_tmp) ? 1 : \
150 #define ADD_OVERFLOW(a, b, res) __compiler_add_overflow((a), (b), (res)) macro
/optee_os-3.20.0/core/arch/arm/mm/
A Dsp_mem.c41 if (ADD_OVERFLOW(sizeof(struct mobj_sp), s, &s)) in mobj_sp_size()
83 if (ADD_OVERFLOW(*idx, num_pages, &n) || n > tot_page_count) in sp_mem_add_pages()
A Dmobj_ffa.c57 if (ADD_OVERFLOW(sizeof(struct mobj_ffa), s, &s)) in shm_size()
215 if (ADD_OVERFLOW(*idx, num_pages, &n) || n > tot_page_count) in mobj_ffa_add_pages_at()
/optee_os-3.20.0/core/pta/
A Dsystem.c96 if (ADD_OVERFLOW(data_len, params[0].memref.size, &data_len)) in system_derive_ta_unique_key()
192 if (ADD_OVERFLOW(va, sz, &end_va)) in system_unmap()
/optee_os-3.20.0/core/pta/bcm/
A Delog.c91 if (ADD_OVERFLOW(sz, offset, &end_offs) || in pta_elog_load_nitro_fw()
/optee_os-3.20.0/lib/libutils/isoc/
A Dbget_malloc.c432 if (ADD_OVERFLOW(pl_size, ftr_size, &s)) in raw_memalign()
473 if (ADD_OVERFLOW(s, ftr_size, &s)) in raw_calloc()
492 if (ADD_OVERFLOW(pl_size, hdr_size, &s)) in raw_realloc()
494 if (ADD_OVERFLOW(s, ftr_size, &s)) in raw_realloc()
A Dbget.c640 if (ADD_OVERFLOW(size, SizeQuant - 1, &size))
648 if (ADD_OVERFLOW(size, sizeof(struct bhead), &size))
650 if (ADD_OVERFLOW(size, hdr_size, &size))
/optee_os-3.20.0/core/include/mm/
A Dmobj.h225 return len && !ADD_OVERFLOW(offset, len - 1, &end_offs) && in mobj_check_offset_and_len()
A Dcore_mmu.h641 if (ADD_OVERFLOW(pa, len - 1, &end_pa)) in core_mmu_check_end_pa()
/optee_os-3.20.0/core/arch/arm/kernel/
A Dthread_spmc.c555 ADD_OVERFLOW(sizeof(*descr), n, &n) || n > blen) in mem_share_init()
568 if (ADD_OVERFLOW(region_descr_offs, sizeof(*region_descr), &n) || in mem_share_init()
623 if (!ADD_OVERFLOW(s->frag_offset, rc, &s->frag_offset)) { in add_mem_share_frag()
680 ADD_OVERFLOW(n, addr_range_offs, &n) || n > blen) in add_mem_share()

Completed in 47 milliseconds

12