Home
last modified time | relevance | path

Searched refs:check_add_overflow (Results 1 – 25 of 104) sorted by relevance

12345

/linux/drivers/net/ethernet/sfc/
H A Defx_reflash.c30 if (check_add_overflow(header_offset, EFX_REFLASH_HEADER_LENGTH_OFST + in efx_reflash_parse_reflash_header()
48 if (check_add_overflow(header_offset, header_len, &trailer_offset) || in efx_reflash_parse_reflash_header()
49 check_add_overflow(trailer_offset, payload_size, &trailer_offset) || in efx_reflash_parse_reflash_header()
50 check_add_overflow(trailer_offset, EFX_REFLASH_TRAILER_LEN, in efx_reflash_parse_reflash_header()
117 if (check_add_overflow(header_offset, EFX_SNICIMAGE_HEADER_MINLEN, in efx_reflash_parse_snic_header()
132 if (check_add_overflow(header_offset, header_len, &header_end)) in efx_reflash_parse_snic_header()
135 if (check_add_overflow(header_end, payload_size, &payload_end) || in efx_reflash_parse_snic_header()
172 if (check_add_overflow(header_offset, EFX_SNICBUNDLE_HEADER_LEN, in efx_reflash_parse_snic_bundle_header()
/linux/tools/testing/selftests/vfio/lib/
H A Diova_allocator.c67 if (check_add_overflow(iova, size - 1, &last) || in iova_allocator_alloc()
75 if (check_add_overflow(iova, size - 1, &last) || in iova_allocator_alloc()
/linux/include/linux/usb/
H A Dfunc_utils.h31 if (check_add_overflow(offset, size, \
48 if (check_add_overflow(offset, groupname##_##name##__sz,\
/linux/tools/include/linux/
H A Doverflow.h44 #define check_add_overflow(a, b, d) ({ \ macro
141 if (check_add_overflow(bytes, c, &bytes)) in __ab_c_size()
/linux/include/linux/
H A Doverflow.h61 #define check_add_overflow(a, b, d) \ macro
213 check_add_overflow((x), v, &v); \
353 if (check_add_overflow(addend1, addend2, &bytes)) in size_add()
/linux/drivers/vfio/pci/
H A Dvfio_pci_dmabuf.c146 if (check_add_overflow(start, dma_ranges[i].offset, in vfio_pci_core_fill_phys_vec()
148 check_add_overflow(phys_vec[i].paddr, in vfio_pci_core_fill_phys_vec()
194 if (check_add_overflow(length, len, &length)) in validate_dmabuf_input()
/linux/lib/
H A Dbuildid.c164 if (check_add_overflow(note_off, note_size, &note_end)) in parse_build_id()
176 if (check_add_overflow(new_off, ALIGN(name_sz, 4), &new_off) || in parse_build_id()
177 check_add_overflow(new_off, ALIGN(desc_sz, 4), &new_off) || in parse_build_id()
/linux/io_uring/
H A Dmemmap.c46 if (check_add_overflow(uaddr, len, &end)) in io_pin_pages()
48 if (check_add_overflow(end, PAGE_SIZE - 1, &end)) in io_pin_pages()
206 if (check_add_overflow(reg->user_addr, reg->size, &end)) in io_create_region()
H A Drsrc.c94 if (check_add_overflow(base, acct_len, &tmp)) in io_validate_user_buf_range()
338 if (check_add_overflow(up->offset, nr_args, &tmp)) in __io_register_rsrc_update()
1029 if (unlikely(check_add_overflow(buf_addr, (u64)len, &buf_end))) in validate_fixed_range()
1179 if (check_add_overflow(arg->nr, arg->src_off, &off) || off > nbufs) in io_clone_buffers()
1181 if (check_add_overflow(arg->nr, arg->dst_off, &nbufs)) in io_clone_buffers()
1351 if (unlikely(check_add_overflow(total_len, iov_len, &total_len))) in io_vec_fill_bvec()
1458 if (unlikely(check_add_overflow(total_len, iov[i].iov_len, in io_kern_bvec_size()
H A Dfiletable.c151 if (check_add_overflow(range.off, range.len, &end)) in io_register_file_alloc_range()
/linux/drivers/iommu/iommufd/
H A Dio_pagetable.c83 if (check_add_overflow(*start, iova_alignment - 1, &aligned_start)) in __alloc_iova_check_range()
193 if (check_add_overflow(iova, length - 1, &last)) in iopt_check_iova()
225 if (check_add_overflow(iova, length - 1, &area->node.last)) in iopt_insert_area()
229 if (check_add_overflow(start_byte, length - 1, &area->pages_node.last)) in iopt_insert_area()
494 if (check_add_overflow(start, length - 1, &last)) in iopt_map_file_pages()
608 if (check_add_overflow(bitmap->iova, bitmap->length - 1, &last_iova)) in iommufd_check_iova_range()
710 if (check_add_overflow(iova, length - 1, &last_iova)) in iopt_get_pages()
846 if (check_add_overflow(iova, length - 1, &iova_last)) in iopt_unmap_iova()
H A Dviommu.c303 if (check_add_overflow(offset, cmd->length, &length)) in iommufd_hw_queue_alloc_phys()
305 if (check_add_overflow(length, PAGE_SIZE - 1, &length)) in iommufd_hw_queue_alloc_phys()
371 if (check_add_overflow(cmd->nesting_parent_iova, cmd->length - 1, in iommufd_hw_queue_alloc_ioctl()
/linux/drivers/rtc/
H A Drtc-s32g.c106 if (check_add_overflow(ktime_get_real_seconds(), in s32g_rtc_read_time()
343 if (check_add_overflow(priv->sleep_sec, div64_u64(apival, priv->rtc_hz), in s32g_rtc_suspend()
/linux/drivers/gpu/drm/nouveau/nvif/
H A Dobject.c111 if (check_add_overflow(sizeof(*args), size, &args_size)) in nvif_object_mthd()
248 if (check_add_overflow(sizeof(*args), size, &args_size)) { in nvif_object_ctor()
/linux/block/partitions/
H A Damiga.c169 if (check_add_overflow(start_sect, nr_sects, &end_sect)) { in amiga_partition()
/linux/crypto/asymmetric_keys/
H A Dasymmetric_type.c149 if (check_add_overflow(len_1, len_2, &len)) in asymmetric_key_generate_id()
151 if (check_add_overflow(sizeof(struct asymmetric_key_id), len, &kid_sz)) in asymmetric_key_generate_id()
/linux/drivers/net/ethernet/intel/ice/
H A Dice_nvm.c476 if (check_add_overflow(pfa_ptr, pfa_len - 1, &max_tlv)) { in ice_get_pfa_module_tlv()
511 if (check_add_overflow(next_tlv, 2, &next_tlv) || in ice_get_pfa_module_tlv()
512 check_add_overflow(next_tlv, tlv_len, &next_tlv)) { in ice_get_pfa_module_tlv()
/linux/security/integrity/ima/
H A Dima_kexec.c313 if (check_add_overflow(phys, (phys_addr_t)size - 1, &end_phys)) in ima_validate_range()
/linux/drivers/infiniband/core/
H A Dumem.c123 if (check_add_overflow(curr_base, curr_len, &end) || in ib_umem_find_best_pgsz()
H A Dumem_dmabuf.c129 if (check_add_overflow(offset, (unsigned long)size, &end)) in ib_umem_dmabuf_get_with_dma_device()
H A Dib_core_uverbs.c325 if (check_add_overflow(xa_first, npages, &xa_last)) in rdma_user_mmap_entry_insert_range()
/linux/block/
H A Dioctl.c51 if (check_add_overflow(start, length, &end)) in blkpg_do_ioctl()
115 if (check_add_overflow(start, len, &end) || end > bdev_nr_bytes(bdev)) in blk_validate_byte_range()
201 if (check_add_overflow(start, len, &end) || in blk_ioctl_secure_erase()
/linux/drivers/gpu/drm/virtio/
H A Dvirtgpu_vram.c60 if (check_add_overflow(vma->vm_pgoff << PAGE_SHIFT, vm_size, &vm_end)) in virtio_gpu_vram_mmap()
/linux/drivers/accel/amdxdna/
H A Damdxdna_ubuf.c180 if (check_add_overflow(exp_info.size, va_ent[i].len, &exp_info.size)) { in amdxdna_get_ubuf()
/linux/security/landlock/
H A Dtsync.c259 if (check_add_overflow(s->size, n, &new_capacity)) in tsync_works_grow_by()

12345