函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\slab.h Create Date:2022-07-27 06:59:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:分配数组内存

函数原型:static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)

返回类型:void

参数:

类型参数名称
size_tn
size_tsize
gfp_tflags
594  如果此条件成立可能性小(为编译器优化)(check_mul_overflow(n, size, & bytes))则返回:NULL
596  如果__builtin_constant_p(n)且__builtin_constant_p(size)则返回:开辟内存
598  返回:开辟内存
调用者
名称描述
argv_splitargv_split - split a string at whitespace, returning an argv*@gfp: the GFP mask used to allocate memory*@str: the string to be split*@argcp: returned argument count* Returns an array of pointers to strings which are split out from*@str
__memcat_pMerge two NULL-terminated pointer arrays into a newly allocated* array, which is also NULL-terminated. Nomenclature is inspired by* memset_p() and memcat() found elsewhere in the kernel source tree.
bitmap_alloc
sg_kmallocThe default behaviour of sg_alloc_table() is to use these kmalloc/kfree* helpers.
__kfifo_alloc
bpf_fill_maxinsns1Large test cases need separate allocation and fill handler.
bpf_fill_maxinsns2
bpf_fill_maxinsns3
bpf_fill_maxinsns4
bpf_fill_maxinsns5
bpf_fill_maxinsns6
bpf_fill_maxinsns7
bpf_fill_maxinsns8
bpf_fill_maxinsns9
bpf_fill_maxinsns10
__bpf_fill_ja
bpf_fill_maxinsns12
bpf_fill_maxinsns13
bpf_fill_ld_abs_get_processor_id
__bpf_fill_stxdw
test_sort_init
do_kmem_cache_rcu_persistentCheck that the data written to an RCU-allocated object survives* reallocation.
codec_initdec_init - Initialize a Reed-Solomon codec*@symsize: symbol size, bits (1-8)*@gfpoly: Field generator polynomial coefficients*@gffunc: Field generator function*@fcr: first root of RS code generator polynomial, index form*@prim: primitive element to
alloc_ws
mpi_resize调整mpi数组空间
sg_splitsg_split - split a scatterlist into several scatterlists*@in: the input sg list*@in_mapped_nents: the result of a dma_map_sg(in,
rbtree_test_init
interval_tree_test_init
create_setup_data_nodes
domain_setup_ctrlval
amd_cache_gart
alloc_sched_domains
lock_torture_init
__test_cycle
get_random_order
stress
irq_sim_initq_sim_init - Initialize the interrupt simulator: allocate a range of* dummy interrupts.*@sim: The interrupt simulator object to initialize.*@num_irqs: Number of interrupts to allocate* On success: return the base of the allocated interrupt range.
insert_extentsert_extent - Safely insert a new idmap extent into struct uid_gid_map.* Takes care to allocate a 4K block of memory if the number of mappings exceeds* UID_GID_MAP_MAX_BASE_EXTENTS.
kdb_defcmd
kdb_register_flags
relay_create_buflay_create_buf - allocate and initialize a channel buffer*@chan: the relay channel* Returns channel buffer if successful, %NULL otherwise.
allocate_cmdlines_buffer
alloc_retstack_tasklistTry to assign a return stack array on FTRACE_RETSTACK_ALLOC_SIZE tasks.
ftrace_graph_init_idle_taskAllocate a return stack for the idle task. May be the first* time through, or it may be done by CPU hotplug online.
ftrace_graph_init_taskAllocate a return stack for newly created task
start_graph_tracingAllocate a return stack for each task
predicate_parseWithout going into a formal proof, this explains the method that is used in* parsing the logical expressions
realloc_reference_statealloc_reference_state()
realloc_stack_statealloc_stack_state()
bpf_check
trie_get_next_key
dev_map_create_hash
mempool_resizemempool_resize - resize an existing memory pool*@pool: pointer to the memory pool which was allocated via* mempool_create().*@new_min_nr: the new minimum number of elements guaranteed to be* allocated for this pool.* This function shrinks/grows the pool
vmstat_start
swapfile_init
hugetlb_init
do_huge_pmd_wp_page_fallback
blk_stat_alloc_callback
ldm_validate_tocblocksldm_validate_tocblocks - Validate the table of contents and its backups*@state: Partition check state including device holding the LDM Database*@base: Offset, into @state->bdev, of the database*@ldb: Cache of the database structures* Find and compare the
trusted_readrusted_read - copy the sealed blob data to userspace in hex.* On success, return to userspace the trusted key datablob size.
template_desc_init_fields
rw_copy_check_uvectorw_copy_check_uvector() - Copy an array of &struct iovec from userspace* into the kernel and check that it is valid.*@type: One of %CHECK_IOVEC_ONLY, %READ, or %WRITE.*@uvector: Pointer to the userspace array.
compat_rw_copy_check_uvector
__nd_alloc_stack
compat_core_sys_selectWe can actually return ERESTARTSYS instead of EINTR, but I'd* like to be certain this leads to no problems. So I return* EINTR just for safety.* Update: ERESTARTSYS breaks at least the xview clock binary, so
splice_grow_spdCheck if we need to grow the arrays holding pages and partial page* descriptions.
default_file_splice_read
__blkdev_direct_IO_simple
mb_cache_createmb_cache_create - create cache*@bucket_bits: log2 of the hash table size* Create cache for keys with 2^bucket_bits hash entries.
format_corenamermat_corename will inspect the pattern parameter, and output a* name into corename, which must have space for at least* CORENAME_MAX_SIZE bytes plus one byte for the zero terminator.
do_coredump
kcalloc分配数组内存并置零
ptr_ring_resize_multipleNote: producer lock is nested within consumer lock, so if you* resize you must make sure all uses nest correctly.* In particular if you consume ring in interrupt or BH context, you must* disable interrupts/BH when doing so.