| /linux/drivers/net/ethernet/sfc/ |
| H A D | efx_reflash.c | 30 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 D | iova_allocator.c | 67 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 D | func_utils.h | 31 if (check_add_overflow(offset, size, \ 48 if (check_add_overflow(offset, groupname##_##name##__sz,\
|
| /linux/tools/include/linux/ |
| H A D | overflow.h | 44 #define check_add_overflow(a, b, d) ({ \ macro 122 if (check_add_overflow(bytes, c, &bytes)) in __ab_c_size()
|
| /linux/include/linux/ |
| H A D | overflow.h | 67 #define check_add_overflow(a, b, d) \ macro 219 check_add_overflow((x), v, &v); \ 359 if (check_add_overflow(addend1, addend2, &bytes)) in size_add()
|
| /linux/drivers/vfio/pci/ |
| H A D | vfio_pci_dmabuf.c | 134 if (check_add_overflow(start, dma_ranges[i].offset, in vfio_pci_core_fill_phys_vec() 136 check_add_overflow(phys_vec[i].paddr, in vfio_pci_core_fill_phys_vec() 182 if (check_add_overflow(length, len, &length)) in validate_dmabuf_input()
|
| /linux/fs/xfs/libxfs/ |
| H A D | xfs_exchmaps.c | 694 if (check_add_overflow(req->ip1_bcount, bmbt_blocks, &req->ip1_bcount)) in xfs_exchmaps_estimate_overhead() 696 if (check_add_overflow(req->ip2_bcount, bmbt_blocks, &req->ip2_bcount)) in xfs_exchmaps_estimate_overhead() 704 if (check_add_overflow(resblks, bmbt_blocks, &resblks)) in xfs_exchmaps_estimate_overhead() 706 if (check_add_overflow(resblks, bmbt_blocks, &resblks)) in xfs_exchmaps_estimate_overhead() 708 if (check_add_overflow(resblks, rmapbt_blocks, &resblks)) in xfs_exchmaps_estimate_overhead() 710 if (check_add_overflow(resblks, rmapbt_blocks, &resblks)) in xfs_exchmaps_estimate_overhead() 881 if (check_add_overflow(ifp->if_nextents, (uint64_t)delta, in xmi_ensure_delta_nextents()
|
| /linux/io_uring/ |
| H A D | memmap.c | 46 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 D | rsrc.c | 94 if (check_add_overflow(base, acct_len, &tmp)) in io_validate_user_buf_range() 356 if (check_add_overflow(up->offset, nr_args, &tmp)) in __io_register_rsrc_update() 1041 if (unlikely(check_add_overflow(buf_addr, (u64)len, &buf_end))) in validate_fixed_range() 1198 if (check_add_overflow(arg->nr, arg->src_off, &off) || off > nbufs) in io_clone_buffers() 1200 if (check_add_overflow(arg->nr, arg->dst_off, &nbufs)) in io_clone_buffers() 1370 if (unlikely(check_add_overflow(total_len, iov_len, &total_len))) in io_vec_fill_bvec() 1477 if (unlikely(check_add_overflow(total_len, iov[i].iov_len, in io_kern_bvec_size()
|
| H A D | filetable.c | 147 if (check_add_overflow(range.off, range.len, &end)) in io_register_file_alloc_range()
|
| /linux/lib/ |
| H A D | buildid.c | 164 if (check_add_overflow(note_off, note_size, ¬e_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/drivers/iommu/iommufd/ |
| H A D | viommu.c | 303 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()
|
| H A D | io_pagetable.c | 83 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 D | device.c | 1342 WARN_ON(check_add_overflow(iova, length - 1, &last_iova))) in iommufd_access_unpin_pages() 1427 if (check_add_overflow(iova, length - 1, &last_iova)) in iommufd_access_pin_pages() 1511 if (check_add_overflow(iova, length - 1, &last_iova)) in iommufd_access_rw()
|
| /linux/drivers/rtc/ |
| H A D | rtc-s32g.c | 106 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/block/partitions/ |
| H A D | amiga.c | 169 if (check_add_overflow(start_sect, nr_sects, &end_sect)) { in amiga_partition()
|
| /linux/crypto/asymmetric_keys/ |
| H A D | asymmetric_type.c | 148 if (check_add_overflow(len_1, len_2, &len)) in asymmetric_key_generate_id() 150 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 D | ice_nvm.c | 476 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/drivers/infiniband/core/ |
| H A D | ib_core_uverbs.c | 301 if (check_add_overflow(xa_first, npages, &xa_last)) in rdma_user_mmap_entry_insert_range()
|
| H A D | umem.c | 122 if (check_add_overflow(curr_base, curr_len, &end) || in ib_umem_find_best_pgsz()
|
| H A D | umem_dmabuf.c | 129 if (check_add_overflow(offset, (unsigned long)size, &end)) in ib_umem_dmabuf_get_with_dma_device()
|
| /linux/block/ |
| H A D | ioctl.c | 51 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/fs/xfs/ |
| H A D | xfs_exchrange.c | 387 if (check_add_overflow(fxr->file1_offset, fxr->length, &tmp) || in xfs_exchange_range_checks() 388 check_add_overflow(fxr->file2_offset, fxr->length, &tmp)) in xfs_exchange_range_checks()
|
| /linux/drivers/vfio/ |
| H A D | vfio_iommu_type1.c | 917 check_add_overflow(user_iova, iova_size - 1, &iova_end)) in vfio_iommu_type1_pin_pages() 1037 check_add_overflow(user_iova, iova_size - 1, &iova_end))) in vfio_iommu_type1_unpin_pages() 1434 if (check_add_overflow(iova, size - 1, &iova_end)) { in vfio_dma_do_unmap() 1701 if (check_add_overflow(iova, size - 1, &iova_end) || in vfio_dma_do_map() 1702 check_add_overflow(vaddr, size - 1, &vaddr_end)) in vfio_dma_do_map() 3036 if (check_add_overflow(iova, size - 1, &iova_end)) in vfio_iommu_type1_dirty_pages()
|
| /linux/drivers/vfio/pci/nvgrace-gpu/ |
| H A D | main.c | 275 check_add_overflow(PFN_PHYS(pgoff), req_len, &end)) in nvgrace_gpu_mmap() 985 if ((check_add_overflow(nvdev->usemem.memphys, in nvgrace_gpu_init_nvdev_struct()
|