| /xnu-8796.141.3/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-8796.141.3/iokit/DriverKit/ |
| H A D | safe_allocation.h | 212 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) { 230 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-8796.141.3/libkern/libkern/c++/ |
| H A D | safe_allocation.h | 212 if (__improbable(os_mul_overflow(n, sizeof(T), &bytes) || (n > UINT32_MAX))) { 230 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-8796.141.3/bsd/kern/ |
| H A D | kern_core.c | 495 if (os_mul_overflow(segment_count, segment_command_sz, &lhs)) { in coredump() 516 if (os_mul_overflow(notes_count, sizeof(struct note_command), ¬es_size)) { in coredump()
|
| H A D | kern_trustcache.c | 813 if (os_mul_overflow(tc_offsets->num_caches, sizeof(uint32_t), &offsets_length)) { in load_static_trust_cache()
|
| H A D | sysv_shm.c | 1059 if (os_mul_overflow(shminfo.shmmni, sizeof(struct shmid_kernel), &sz)) { in shminit()
|
| H A D | kdebug.c | 1512 if (os_mul_overflow(nthreads, sizeof(kd_threadmap), mapsize)) { in _thread_map_create_live() 1922 if (os_mul_overflow(map_count, sizeof(kd_threadmap), &map_size)) { in _write_legacy_header()
|
| H A D | kern_event.c | 1397 if (os_mul_overflow((uint64_t)kev->ext[1], multiplier, &leeway_ns)) { in filt_timervalidate() 1417 if (os_mul_overflow((uint64_t)kev->data, multiplier, &calendar_deadline_ns)) { in filt_timervalidate() 1489 if (os_mul_overflow((uint64_t)kev->data, multiplier, &interval_ns)) { in filt_timervalidate() 8759 if (os_mul_overflow(sizeof(kqueue_id_t), buflen, &bufsize)) { in kevent_copyout_proc_dynkqids() 8790 if (os_mul_overflow(sizeof(kqueue_id_t), MIN(buflen, nkqueues), ©size)) { in kevent_copyout_proc_dynkqids()
|
| H A D | kern_aio.c | 1049 os_mul_overflow(sizeof(user_addr_t), uap->nent, &aiocbpp_size)) { in aio_suspend_nocancel()
|
| H A D | proc_info.c | 1695 if (os_mul_overflow(ncoals, elem_size, &k_buffersize)) { in proc_listcoalitions() 2889 if (os_mul_overflow(nuptrs, sizeof(uint64_t), ©size)) { in proc_pidlistuptrs()
|
| /xnu-8796.141.3/libsyscall/wrappers/spawn/ |
| H A D | posix_spawn.c | 965 if (os_mul_overflow(acts->pspa_alloc, 2, &newnum)) { in posix_spawn_growportactions_np() 1516 if (os_mul_overflow((*psactsp)->psfa_act_alloc, 2, &newnum)) { in _posix_spawn_file_actions_grow() 2245 if (os_mul_overflow(psmx->psmx_alloc, 2, &newnum)) { in posix_spawnattr_setmacpolicyinfo_np()
|
| /xnu-8796.141.3/osfmk/kern/ |
| H A D | ledger.c | 128 if (os_mul_overflow(offset, sizeof(struct ledger_entry_small), &offset) || offset >= l->l_size) { in is_entry_valid() 220 …if (os_mul_overflow(lt_table_size, (sizeof(struct ledger_entry) / sizeof(struct ledger_entry_small… in ledger_template_entries_lut_size() 452 if (os_mul_overflow(old_cnt, 2, &new_cnt)) { in ledger_entry_add_with_flags()
|
| H A D | machine.c | 1394 if (os_mul_overflow(timeout, scale, &timeout)) { in machine_timeout_init_with_suffix()
|
| H A D | debug.c | 528 if (os_mul_overflow(carveouts[i].requested_size, 1024 * 1024, &temp_carveout_size)) { in phys_carveout_init()
|
| H A D | kern_cdata.c | 290 if (os_mul_overflow(num_items, KCDATA_ALIGNMENT_SIZE - 1, &max_padding_bytes)) { in kcdata_estimate_required_buffer_size()
|
| /xnu-8796.141.3/bsd/net/classq/ |
| H A D | classq_fq_codel.c | 657 if (os_mul_overflow(fq_cl->fcl_stat.fcl_avg_qdelay, in fq_getq_flow()
|
| /xnu-8796.141.3/iokit/Kernel/ |
| H A D | IODeviceTreeSupport.cpp | 1072 if (__improbable(os_mul_overflow(gIODTResolvers->alloc, 2, in IODTSetResolving()
|
| /xnu-8796.141.3/osfmk/ipc/ |
| H A D | ipc_kmsg.c | 1729 } else if (os_mul_overflow(desc_count, USER_DESC_MAX_DELTA, &max_delta)) { in ipc_kmsg_alloc() 4570 if (os_mul_overflow(count, sizeof(mach_port_t), &ports_length)) { in ipc_kmsg_copyin_ool_ports_descriptor() 4575 if (os_mul_overflow(count, sizeof(mach_port_name_t), &names_length)) { in ipc_kmsg_copyin_ool_ports_descriptor()
|
| /xnu-8796.141.3/bsd/netkey/ |
| H A D | key.c | 2691 if (__improbable(os_mul_overflow(lft->sadb_lifetime_addtime, NSEC_PER_SEC, &lifetime_ns))) { in key_spdadd() 2699 if (__improbable(os_mul_overflow(lft->sadb_lifetime_usetime, NSEC_PER_SEC, &validtime_ns))) { in key_spdadd() 4625 if (__improbable(os_mul_overflow(sav->lft_h->sadb_lifetime_addtime, NSEC_PER_SEC, &nanotime))) { in key_setsaval() 4645 if (__improbable(os_mul_overflow(sav->lft_s->sadb_lifetime_addtime, NSEC_PER_SEC, &nanotime))) { in key_setsaval() 10145 if (os_mul_overflow(ipsec_sav_count + 1, sizeof(*sa_stats_sav), &bufsize)) { in key_getsastat()
|
| /xnu-8796.141.3/bsd/vfs/ |
| H A D | vfs_cluster.c | 384 if (__improbable(os_mul_overflow(max_io_size, io_scale, &prefetch) || in cluster_max_prefetch() 2881 if (__improbable(os_mul_overflow(max_upl_size, IO_SCALE(vp, 2), in cluster_write_direct() 4772 if (__improbable(os_mul_overflow(max_rd_size, IO_SCALE(vp, 2), in cluster_read_direct()
|
| H A D | vfs_cache.c | 3059 if (os_mul_overflow(dNodes, 2, &nelements)) { in resize_namecache()
|
| /xnu-8796.141.3/bsd/netinet/ |
| H A D | flow_divert.c | 3046 if (os_mul_overflow(sizeof(*new_trie.nodes), (size_t)nodes_count, &nodes_mem_size) || in flow_divert_handle_app_map_create() 3048 os_mul_overflow(sizeof(*new_trie.bytes), (size_t)bytes_count, &bytes_mem_size) || in flow_divert_handle_app_map_create()
|
| /xnu-8796.141.3/tests/ |
| H A D | proc_info.c | 1966 if (os_mul_overflow(sizeof(kqueue_id_t), kqids_len, &kqids_size)) { in list_kqids()
|