| /xnu-12377.81.4/libkern/os/ |
| H A D | overflow.h | 60 #define os_mul_overflow(a, b, res) __os_warn_unused(__builtin_mul_overflow((a), (b), (res))) macro 88 _s = os_mul_overflow((a), (b), &_tmp); \ 89 _t = os_mul_overflow((c), _tmp, (res)); \ 98 _t = os_mul_overflow((x), _tmp, (res)); \ 106 _s = os_mul_overflow((a), (x), &_tmp); \
|
| /xnu-12377.81.4/bsd/net/ |
| H A D | trie_utility.c | 150 if (os_mul_overflow(sizeof(*new_trie->nodes), (size_t)nodes_count, &nodes_mem_size) || in net_trie_init() 152 os_mul_overflow(sizeof(*new_trie->bytes), (size_t)bytes_count, &bytes_mem_size) || in net_trie_init() 223 os_mul_overflow(sizeof(*new_trie->nodes), (size_t)nodes_count, &test_nodes_mem_size) || in net_trie_init_with_mem() 225 os_mul_overflow(sizeof(*new_trie->bytes), (size_t)bytes_count, &test_bytes_mem_size)) { in net_trie_init_with_mem()
|
| /xnu-12377.81.4/libkern/libkern/c++/ |
| H A D | safe_allocation.h | 216 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) { 234 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) {
|
| H A D | bounded_ptr.h | 394 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) { 414 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) {
|
| /xnu-12377.81.4/iokit/DriverKit/ |
| H A D | safe_allocation.h | 216 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) { 234 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) {
|
| H A D | bounded_ptr.h | 394 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) { 414 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes))) {
|
| /xnu-12377.81.4/bsd/kern/ |
| H A D | kern_core.c | 560 if (os_mul_overflow(segment_count, segment_command_sz, &lhs)) { in coredump() 581 if (os_mul_overflow(notes_count, sizeof(struct note_command), ¬es_size)) { in coredump()
|
| H A D | kern_trustcache.c | 1216 if (os_mul_overflow(tc_offsets->num_caches, sizeof(uint32_t), &offsets_length)) { in load_static_trust_cache()
|
| H A D | sysv_shm.c | 1060 if (os_mul_overflow(shminfo.shmmni, sizeof(struct shmid_kernel), &sz)) { in shminit()
|
| H A D | kdebug.c | 1712 if (os_mul_overflow(nthreads, sizeof(kd_threadmap), mapsize)) { in _thread_map_create_live() 2788 if (os_mul_overflow(map_count, sizeof(kd_threadmap), &map_size)) { in _write_legacy_header()
|
| H A D | kern_event.c | 1467 if (os_mul_overflow((uint64_t)kev->ext[1], multiplier, &leeway_ns)) { in filt_timervalidate() 1487 if (os_mul_overflow((uint64_t)kev->data, multiplier, &calendar_deadline_ns)) { in filt_timervalidate() 1559 if (os_mul_overflow((uint64_t)kev->data, multiplier, &interval_ns)) { in filt_timervalidate() 9357 if (os_mul_overflow(sizeof(kqueue_id_t), buflen, &bufsize)) { 9403 if (os_mul_overflow(sizeof(kqueue_id_t), MIN(buflen, nkqueues), ©size)) {
|
| H A D | proc_info.c | 1771 if (os_mul_overflow(ncoals, elem_size, &k_buffersize)) { in proc_listcoalitions() 3027 if (os_mul_overflow(nuptrs, sizeof(uint64_t), ©size)) { in proc_pidlistuptrs()
|
| /xnu-12377.81.4/libsyscall/wrappers/spawn/ |
| H A D | posix_spawn.c | 1025 if (os_mul_overflow(acts->pspa_alloc, 2, &newnum)) { in posix_spawn_growportactions_np() 1602 if (os_mul_overflow((*psactsp)->psfa_act_alloc, 2, &newnum)) { in _posix_spawn_file_actions_grow() 2358 if (os_mul_overflow(psmx->psmx_alloc, 2, &newnum)) { in posix_spawnattr_setmacpolicyinfo_np()
|
| /xnu-12377.81.4/bsd/skywalk/mem/ |
| H A D | skmem_slab.c | 245 } else if (os_mul_overflow(boff, 2, &boff)) { in skmem_slab_alloc_locked()
|
| /xnu-12377.81.4/osfmk/kern/ |
| H A D | ledger.c | 147 if (os_mul_overflow(offset, sizeof(struct ledger_entry_small), &offset) || offset >= l->l_size) { in is_entry_valid() 247 …if (os_mul_overflow(lt_table_size, (sizeof(struct ledger_entry) / sizeof(struct ledger_entry_small… in ledger_template_entries_lut_size() 512 if (os_mul_overflow(old_cnt, 2, &new_cnt)) { in ledger_entry_add_with_flags()
|
| H A D | kern_cdata.c | 292 if (os_mul_overflow(num_items, KCDATA_ALIGNMENT_SIZE - 1, &max_padding_bytes)) { in kcdata_estimate_required_buffer_size()
|
| H A D | machine.c | 1667 if (os_mul_overflow(timeout, scale, &timeout)) { in machine_timeout_init_with_suffix()
|
| H A D | debug.c | 579 if (os_mul_overflow(carveouts[i].requested_size, 1024 * 1024, &temp_carveout_size)) { in phys_carveout_init()
|
| /xnu-12377.81.4/bsd/net/classq/ |
| H A D | classq_fq_codel.c | 801 if (os_mul_overflow(fq_cl->fcl_stat.fcl_avg_qdelay, in fq_codel_dq_legacy()
|
| /xnu-12377.81.4/iokit/Kernel/ |
| H A D | IODeviceTreeSupport.cpp | 1105 if (__improbable(os_mul_overflow(gIODTResolvers->alloc, 2, in IODTSetResolving()
|
| /xnu-12377.81.4/osfmk/vm/ |
| H A D | vm_user.c | 1735 os_mul_overflow( in mach_vm_page_range_query_sanitize()
|
| /xnu-12377.81.4/bsd/netkey/ |
| H A D | key.c | 2602 if (__improbable(os_mul_overflow(lft->sadb_lifetime_addtime, NSEC_PER_SEC, &lifetime_ns))) { in key_spdadd() 2610 if (__improbable(os_mul_overflow(lft->sadb_lifetime_usetime, NSEC_PER_SEC, &validtime_ns))) { in key_spdadd() 4544 if (__improbable(os_mul_overflow(sav->lft_h->sadb_lifetime_addtime, NSEC_PER_SEC, &nanotime))) { in key_setsaval() 4564 if (__improbable(os_mul_overflow(sav->lft_s->sadb_lifetime_addtime, NSEC_PER_SEC, &nanotime))) { in key_setsaval() 10122 if (os_mul_overflow(ipsec_sav_count + 1, sizeof(*sa_stats_sav), &bufsize)) { in key_getsastat()
|
| /xnu-12377.81.4/bsd/vfs/ |
| H A D | vfs_cluster.c | 454 if (__improbable(os_mul_overflow(max_io_size, io_scale, &prefetch) || in cluster_max_prefetch() 3464 if (__improbable(os_mul_overflow(max_upl_size, IO_SCALE(vp, 2), in cluster_write_direct() 5430 if (__improbable(os_mul_overflow(max_rd_size, IO_SCALE(vp, 2), in cluster_read_direct()
|
| H A D | vfs_cache.c | 3153 if (os_mul_overflow(dNodes, 2, &nelements)) { in resize_namecache()
|
| /xnu-12377.81.4/bsd/netinet/ |
| H A D | flow_divert.c | 3202 if (os_mul_overflow(sizeof(*new_trie.nodes), (size_t)nodes_count, &nodes_mem_size) || in flow_divert_handle_app_map_create() 3204 os_mul_overflow(sizeof(*new_trie.bytes), (size_t)bytes_count, &bytes_mem_size) || in flow_divert_handle_app_map_create()
|