Home
last modified time | relevance | path

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

1234

/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.c66 if (check_add_overflow(iova, size - 1, &last) || in iova_allocator_alloc()
74 if (check_add_overflow(iova, size - 1, &last) || in iova_allocator_alloc()
/linux/drivers/pci/
H A Drom.c119 if (check_add_overflow((unsigned long)image, PCI_ROM_HEADER_SIZE - 1, in pci_rom_header_valid()
157 if (check_add_overflow((unsigned long)pds, PCI_ROM_DATA_STRUCT_LEN + 1, in pci_rom_data_struct_valid()
175 if (check_add_overflow((unsigned long)pds, data_len - 1, &end)) in pci_rom_data_struct_valid()
/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/fs/smb/server/
H A Dsmbacl.c679 if (check_add_overflow(*size, ace_sz, size)) { in set_posix_acl_entries_dacl()
694 if (check_add_overflow(*size, ace_sz, size)) { in set_posix_acl_entries_dacl()
740 if (check_add_overflow(*size, ace_sz, size)) { in set_posix_acl_entries_dacl()
792 if (check_add_overflow(size, nt_ace_size, &size)) { in set_ntacl_dacl()
1007 check_add_overflow(len, ppntsd_size - dacl_offset, &len)) in smb_acl_sec_desc_scratch_len()
1014 check_add_overflow(len, tmp, &len)) in smb_acl_sec_desc_scratch_len()
1018 if (check_add_overflow(len, 5 * sizeof(struct smb_ace), &len)) in smb_acl_sec_desc_scratch_len()
1025 check_add_overflow(len, tmp, &len)) in smb_acl_sec_desc_scratch_len()
1146 if (check_add_overflow(*nt_size, ace_size, nt_size) || in smb_append_inherited_ace()
1168 check_add_overflow(sid_offset, (size_t)CIFS_SID_BASE_SIZE, in smb_validate_ntsd_sid()
[all …]
/linux/tools/include/linux/
H A Doverflow.h45 #define check_add_overflow(a, b, d) ({ \ macro
142 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/fs/xfs/libxfs/
H A Dxfs_exchmaps.c694 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/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.c61 if (check_add_overflow(uaddr, len, &end)) in io_pin_pages()
63 if (check_add_overflow(end, PAGE_SIZE - 1, &end)) in io_pin_pages()
229 if (check_add_overflow(reg->user_addr, reg->size, &end)) in io_create_region()
H A Drsrc.c144 if (check_add_overflow(base, acct_len, &tmp)) in io_validate_user_buf_range()
428 if (check_add_overflow(up->offset, nr_args, &tmp)) in __io_register_rsrc_update()
1172 if (unlikely(check_add_overflow(buf_addr, (u64)len, &buf_end))) in io_import_fixed()
1372 if (check_add_overflow(arg->nr, arg->src_off, &off) || off > nbufs) in io_clone_buffers()
1374 if (check_add_overflow(arg->nr, arg->dst_off, &nbufs)) in io_clone_buffers()
1553 if (unlikely(check_add_overflow(total_len, iov_len, &total_len))) in io_vec_fill_kern_bvec()
1660 if (unlikely(check_add_overflow(total_len, iov[i].iov_len, in io_import_reg_vec()
1711 check_add_overflow(bvec_bytes, sizeof(*iov) - 1, in io_prep_reg_iovec()
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_blit.c485 check_add_overflow(dst_end, (size_t)width_in_bytes, &dst_end) || in vmw_external_bo_copy()
486 check_add_overflow((size_t)dst_offset, dst_end, &dst_end) || in vmw_external_bo_copy()
489 check_add_overflow(src_end, (size_t)width_in_bytes, &src_end) || in vmw_external_bo_copy()
490 check_add_overflow((size_t)src_offset, src_end, &src_end) || in vmw_external_bo_copy()
/linux/drivers/iommu/iommufd/
H A Dviommu.c321 if (check_add_overflow(offset, cmd->length, &length)) in iommufd_hw_queue_alloc_phys()
323 if (check_add_overflow(length, PAGE_SIZE - 1, &length)) in iommufd_hw_queue_alloc_phys()
389 if (check_add_overflow(cmd->nesting_parent_iova, cmd->length - 1, in iommufd_hw_queue_alloc_ioctl()
/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/net/sched/
H A Dact_pedit.c425 if (check_add_overflow(hoffset, (int)tkey->at, &at_offset) || in tcf_pedit_act()
443 if (check_add_overflow(hoffset, offset, &write_offset)) { in tcf_pedit_act()
464 if (check_add_overflow(write_offset, (int)sizeof(*ptr), in tcf_pedit_act()
/linux/net/batman-adv/
H A Dfragmentation.c199 if (check_add_overflow(chain->size, data_len, in batadv_frag_insert_packet()
216 if (check_add_overflow(chain->size, data_len, &chain->size)) in batadv_frag_insert_packet()
/linux/drivers/net/ethernet/intel/libie/
H A Dpci.c118 if (!size || check_add_overflow(offset, size, &end_offset) || in __libie_pci_map_mmio_region()
/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/fs/ntfs3/
H A Drun.c1101 } else if (check_add_overflow(prev_lcn, dlcn, &lcn)) { in run_unpack()
1110 if (check_add_overflow(vcn64, len, &next_vcn)) in run_unpack()
1131 if (check_add_overflow(lcn, len, &lcn_end)) in run_unpack()
1290 if (check_add_overflow(vcn64, len, &vcn64)) in run_get_highest_vcn()
/linux/drivers/net/ethernet/intel/ice/
H A Dice_nvm.c483 if (check_add_overflow(pfa_ptr, pfa_len - 1, &max_tlv)) { in ice_get_pfa_module_tlv()
518 if (check_add_overflow(next_tlv, 2, &next_tlv) || in ice_get_pfa_module_tlv()
519 check_add_overflow(next_tlv, tlv_len, &next_tlv)) { in ice_get_pfa_module_tlv()
/linux/drivers/accel/qaic/
H A Dsahara.c594 if (check_add_overflow(dump_length, in sahara_parse_dump_table()
612 if (check_add_overflow(dump_length, (u64)sizeof(*dump_meta), &dump_length)) { in sahara_parse_dump_table()
622 if (check_add_overflow(dump_length, mul_bytes, &dump_length)) { in sahara_parse_dump_table()
/linux/security/integrity/ima/
H A Dima_kexec.c333 if (check_add_overflow(phys, (phys_addr_t)size - 1, &end_phys))
/linux/drivers/firmware/google/
H A Dcoreboot_table.c217 check_add_overflow((resource_size_t)header->header_bytes, in coreboot_table_probe()
/linux/drivers/net/usb/
H A Drndis_host.c520 || check_add_overflow(data_offset, data_len, &overflow_check) in rndis_rx_fixup()
521 || check_add_overflow(overflow_check, 8, &overflow_check))) { in rndis_rx_fixup()
/linux/block/
H A Dioctl.c52 if (check_add_overflow(start, length, &end)) in blkpg_do_ioctl()
116 if (check_add_overflow(start, len, &end) || end > bdev_nr_bytes(bdev)) in blk_validate_byte_range()
195 if (check_add_overflow(start, len, &end) || in blk_ioctl_secure_erase()

1234