函数逻辑报告 |
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 |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:开辟内存
函数原型:static __always_inline void *kmalloc(size_t size, gfp_t flags)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
size_t | size | |
gfp_t | flags |
544 | 如果__builtin_constant_p(size)则 |
561 | 返回:开辟内存 |
名称 | 描述 |
---|---|
kobject_rename | kobject_rename() - Change the name of an object |
kobject_move | 移动对象 |
alloc_ldt_struct | The caller must call finalize_ldt_struct on the result. LDT starts zeroed. |
do_open | |
build_socket_tables | |
kdump_buf_page_init | |
kmalloc_parameter | |
__kthread_create_on_node | |
call_modprobe | |
groups_alloc | |
psi_trigger_create | |
lock_torture_stats_print | Print torture statistics |
stress_reorder_work | |
stress | |
pm_vt_switch_required | pm_vt_switch_required - indicate VT switch at suspend requirements*@dev: device*@required: if true, caller needs VT switch at suspend/resume time* The different console drivers may or may not require VT switches across* suspend/resume, depending on how |
__register_nosave_region | gister_nosave_region - Register a region of unsaveable memory.* Register a range of page frames the contents of which should not be saved* during hibernation (to be used in the early initialization code). |
save_image_lzo | save_image_lzo - Save the suspend image data compressed with LZO.*@handle: Swap map handle to use for saving the image.*@snapshot: Image to read data from.*@nr_to_write: Number of pages to save. |
load_image_lzo | load_image_lzo - Load compressed image data and decompress them with LZO.*@handle: Swap map handle to use for loading data.*@snapshot: Image to copy uncompressed data into.*@nr_to_read: Number of pages to load. |
devkmsg_write | |
devkmsg_open | |
syslog_print | |
syslog_print_all | |
rcu_torture_timer | RCU torture reader from timer handler. Dereferences rcu_torture_current,* incrementing the corresponding element of the pipeline array. The* counter in the element should never be greater than 1, otherwise, the* RCU implementation is broken. |
rcu_torture_fwd_prog_cr | Carry out call_rcu() forward-progress testing. |
rcu_perf_writer | RCU perf writer kthread. Repeatedly does a grace period. |
dma_common_contiguous_remap | Remaps an allocated contiguous region into another vm_area.* Cannot be used in non-sleeping contexts |
copy_module_elf | Persist Elf information about a module. Copy the Elf header,* section header table, section string table, and symtab section* index from info to mod->klp_info. |
do_init_module | This is where the real work happens.* Keep it uninlined to provide a reliable breakpoint target, e.g. for the gdb* helper command 'lx-symbols'. |
cgroup_show_path | |
proc_cgroup_show | proc_cgroup_show()* - Print task's cgroup paths into seq_file, one line for each hierarchy* - Used for /proc/ |
cgroup1_release_agent | Notify userspace when a cgroup is released, by running the* configured release agent with the name of the cgroup (path* relative to the root of cgroup file system) as the argument |
current_css_set_cg_links_read | |
audit_send_reply | audit_send_reply - send an audit reply message via netlink*@request_skb: skb of request we are replying to (used to target the reply)*@seq: sequence number*@type: audit message type*@done: done (last) flag*@multi: multi-part message flag*@payload: payload |
audit_receive_msg | |
audit_log_d_path | This is a helper-function to print the escaped d_path |
audit_unpack_string | Unpack a filter field's string representation from user-space* buffer. |
audit_krule_to_data | Translate kernel rule representation to struct audit_rule_data. |
audit_list_rules_send | audit_list_rules_send - list the audit rules*@request_skb: skb of request we are replying to (used to target the reply)*@seq: netlink audit message sequence (serial) number |
audit_log_execve_info | |
audit_log_proctitle | |
__audit_sockaddr | __audit_sockaddr - record audit data for sys_bind, sys_connect, sys_sendto*@len: data length in user space*@a: data address in kernel space* Returns 0 for success or NULL context or < 0 on error. |
__audit_log_bprm_fcaps | __audit_log_bprm_fcaps - store information about a loading bprm and relevant fcaps*@bprm: pointer to the bprm being processed*@new: the proposed new credentials*@old: the old credentials* Simply check if the proc already has the caps given by the file and |
alloc_tree | |
kcov_remote_add | |
__get_insn_slot | __get_insn_slot() - Find a slot on an executable page for an instruction.* We allocate an executable page if there's no room on existing ones. |
kprobe_add_ksym_blacklist | |
fei_write | |
kdb_strdup | kdb_strdup - kdb equivalent of strdup, for disasm code.* Inputs:* str The string to duplicate.* type Flags to kmalloc for the new string.* Returns:* Address of the new string, NULL if storage could not be allocated.* Remarks:* This is not in lib/string |
parse | |
allocate_probes | |
tracepoint_module_coming | |
ring_buffer_read_prepare | g_buffer_read_prepare - Prepare for a non consuming read of the buffer*@buffer: The ring buffer to read from*@cpu: The cpu buffer to iterate over*@flags: gfp flags to use for memory allocation* This performs the initial preparations necessary to iterate |
trace_pid_write | |
trace_parser_get_init | race_parser_get_init - gets the buffer for trace parser |
register_tracer | gister_tracer - register a tracer with the ftrace system.*@type: the plugin for the tracer* Register a new plugin tracer. |
trace_create_savedcmd | |
tracing_cpumask_read | |
tracing_resize_saved_cmdlines | |
tracing_stats_read | |
trace_parse_run_command | |
early_trace_init | |
hold_module_trace_bprintk_format | |
event_filter_read | |
subsystem_filter_read | |
show_header | |
create_new_subsystem | |
event_subsystem_dir | |
set_syscall_print_fmt | |
append_filter_err | |
set_synth_event_print_fmt | |
traceprobe_parse_probe_arg_body | String length checking wrapper |
traceprobe_set_print_fmt | |
trace_probe_add_file | |
map_lookup_elem | |
map_update_elem | |
map_get_next_key | |
map_lookup_and_delete_elem | |
copy_verifier_state | |
prog_array_map_poke_track | |
__cgroup_bpf_attach | __cgroup_bpf_attach() - Attach the program to a cgroup, and* propagate the change to descendants*@cgrp: The cgroup which descendants to traverse*@prog: A program to attach*@type: Type of attach operation*@flags: Option flags |
perf_event_mmap_event | |
build_map_info | |
__create_xol_area | |
dup_utask | |
prepare_uretprobe | |
torture_shuffle_task_register | Register a task to be shuffled. If there is no memory, just splat* and don't bother registering. |
find_link | |
dir_add | |
unpack_to_rootfs | |
identify_ramdisk_image | This routine tries to find a RAM disk image to load, and returns the* number of blocks to read for a non-compressed image, 0 if the image* is a compressed image, and -1 if an image with the right magic* numbers could not be found |
rd_load_image | |
mempool_kmalloc | A commonly used alloc and free fn that kmalloc/kfrees the amount of memory* specified by pool_data |
__vmalloc | |
process_vm_rw_core | process_vm_rw_core - core of reading/writing pages from task specified*@pid: PID of process to read/write from/to*@iter: where to copy to/from locally*@rvec: iovec array specifying where to copy to/from in the other process*@riovcnt: size of rvec |
memblock_double_array | |
add_swap_extent | Add a block range (and the corresponding page range) into this swapdev's* extent tree.* This function rather assumes that it is called in ascending page order. |
pool_alloc_page | |
region_chg | Examine the existing reserve map and determine how many* huge pages in the specified range [f, t) are NOT currently* represented. This routine is called before a subsequent* call to region_add that will actually modify the reserve |
region_del | Delete the specified range [f, t) from the reserve map. If the* t parameter is LONG_MAX, this indicates that ALL regions after f* should be deleted. Locate the regions which intersect [f, t)* and either trim, delete or split the existing regions. |
resv_map_alloc | |
hugetlb_hstate_alloc_pages | |
memory_stat_format | |
__mem_cgroup_usage_register_event | |
mem_cgroup_oom_register_event | |
add_to_kill | Schedule a process for later kill.* Uses GFP_ATOMIC allocations to avoid potential recursions in the VM. |
kmemleak_test_init | Some very simple testing. This function needs to be extended for* proper testing. |
print_page_owner | |
zpool_create_pool | zpool_create_pool() - Create a new zpool*@type: The type of the zpool to create (e.g. zbud, zsmalloc)*@name: The name of the zpool (e.g. zram0, zswap)*@gfp: The GFP flags to use when allocating the pool.*@ops: The optional ops callback. |
__zs_cpu_up | |
ipc_init_proc_interface | pc_init_proc_interface - create a proc interface for sysipc types using a seq_file interface.*@path: Path in procfs*@header: Banner to be printed at the beginning of the file.*@ids: ipc id table to iterate.*@show: show routine. |
alloc_msg | |
msg_insert | Auxiliary functions to manipulate messages' list |
do_mq_timedsend | |
do_mq_timedreceive | |
bio_alloc_bioset | _alloc_bioset - allocate a bio for I/O*@gfp_mask: the GFP_* mask given to the slab allocator*@nr_iovecs: number of iovecs to pre-allocate*@bs: the bio_set to allocate from |
bio_alloc_map_data | |
blk_mq_elv_switch_none | Cache the elevator_type in qe pair list and switch the* io scheduler to 'none' |
blk_stat_alloc_callback | |
blk_alloc_queue_stats | |
register_blkdev | gister_blkdev - register a new block device*@major: the requested major device number [1..BLKDEV_MAJOR_MAX-1]. If*@major = 0, try to allocate any unused major number.*@name: the name of the new block device as a zero terminated string |
disk_seqf_start | rator |
alloc_pvd | alloc_pvd(): reads physical volume descriptor*@state*@lba* Description: Returns pvd on success, NULL on error.* Allocates space for pvd and fill it with disk blocks at @lba* Notes: remember to free pvd when you're done! |
alloc_lvn | alloc_lvn(): reads logical volume names*@state*@lba* Description: Returns lvn on success, NULL on error.* Allocates space for lvn and fill it with disk blocks at @lba* Notes: remember to free lvn when you're done! |
ldm_validate_privheads | ldm_validate_privheads - Compare the primary privhead with its backups*@state: Partition check state including device holding the LDM Database*@ph1: Memory struct to fill with ph contents* Read and compare all three privheads from disk |
ldm_ldmdb_add | ldm_ldmdb_add - Adds a raw VBLK entry to the ldmdb database*@data: Raw VBLK to add to the database*@len: Size of the raw VBLK*@ldb: Cache of the database structures* The VBLKs are sorted into categories. Partitions are also sorted by offset.* N |
ldm_frag_add | ldm_frag_add - Add a VBLK fragment to a list*@data: Raw fragment to be added to the list*@size: Size of the raw fragment*@frags: Linked list of VBLK fragments* Fragmented VBLKs may not be consecutive in the database, so they are placed |
ldm_partition | ldm_partition - Find out whether a device is a dynamic disk and handle it*@state: Partition check state including device holding the LDM Database* This determines whether the device @bdev is a dynamic disk and if so creates |
ibm_partition | This is the main function, called by check.c |
alloc_read_gpt_entries | alloc_read_gpt_entries(): reads partition entries from disk*@state: disk parsed partitions*@gpt: GPT header* Description: Returns ptes on success, NULL on error |
alloc_read_gpt_header | alloc_read_gpt_header(): Allocates GPT header, reads into it from disk*@state: disk parsed partitions*@lba: the Logical Block Address of the partition table* Description: returns GPT header on success, NULL on error. Allocates |
bio_integrity_alloc | _integrity_alloc - Allocate integrity payload and attach it to bio*@bio: bio to attach integrity metadata to*@gfp_mask: Memory allocation mask*@nr_vecs: Number of integrity metadata scatter-gather elements* Description: This function prepares a bio for |
bio_integrity_prep | _integrity_prep - Prepare bio for integrity I/O*@bio: bio to prepare* Description: Checks if the bio already has an integrity payload attached.* If it does, the payload has been generated by another kernel subsystem,* and we just pass it through |
init_opal_dev | |
key_user_lookup | Get the key quota record for a user, allocating a new record if one doesn't* already exist. |
keyctl_update_key | Update a key's data payload from the given data.* The key must grant the caller Write permission and the key type must support* updating for this to work. A negative key can be positively instantiated* with this call.* If successful, 0 will be returned |
user_preparse | Preparse a user defined key payload |
kdf_alloc | |
keyctl_dh_compute_kdf | |
__keyctl_dh_compute | |
keyctl_pkey_e_d_s | Encrypt/decrypt/sign* Encrypt data, decrypt data or sign data using a public key |
big_key_preparse | Preparse a big key |
init_sdesc | |
tpm_seal | Have the TPM seal(encrypt) the trusted key, possibly based on* Platform Configuration Registers (PCRs). AUTH1 for sealing key. |
trusted_instantiate | rusted_instantiate - create a new trusted key* Unseal an existing trusted blob or, for a new key, get a* random key, then seal and create a trusted key-type key,* adding it to the specified keyring.* On success, return 0. Otherwise return errno. |
trusted_update | rusted_update - reseal an existing key with new PCR values |
datablob_format | datablob_format - format as an ascii string, before copying to userspace |
derived_key_decrypt | |
encrypted_instantiate | rypted_instantiate - instantiate an encrypted key* Decrypt an existing encrypted datablob or create a new encrypted key* based on a kernel random number.* On success, return 0. Otherwise return errno. |
encrypted_update | rypted_update - update the master key description* Change the master key description for an existing encrypted key.* The next read will return an encrypted datablob using the new* master key description.* On success, return 0. Otherwise return errno. |
cap_inode_getsecurity | getsecurity: We are called for security |
cap_convert_nscap | User requested a write of security.capability. If needed, update the* xattr to change from v2 to v3, or to fixup the v3 rootid.* If all is ok, we return the new size, on error return < 0. |
avc_add_callback | avc_add_callback - Register a callback for security events.*@callback: callback function*@events: security events* Register a callback function for events in the set @events.* Returns %0 on success or -%ENOMEM if insufficient memory |
inode_doinit_use_xattr | |
selinux_kernfs_init_security | kernfs node operations |
selinux_xfrm_alloc_user | Allocates a xfrm_sec_state and populates it using the supplied security* xfrm_user_sec_ctx context. |
selinux_xfrm_state_alloc_acquire | LSM hook implementation that allocates a xfrm_sec_state and populates based* on a secid. |
smk_cipso_doi | smk_cipso_doi - initialize the CIPSO domain |
tomoyo_print_header | moyo_print_header - Get header line of audit log.*@r: Pointer to "struct tomoyo_request_info".* Returns string representation.* This function uses kmalloc(), so caller must kfree() if this function* didn't return NULL. |
tomoyo_add_entry | moyo_add_entry - Add an ACL to current thread's domain. Used by learning mode.*@domain: Pointer to "struct tomoyo_domain_info".*@header: Lines containing ACL.* Returns nothing. |
tomoyo_realpath_from_path | moyo_realpath_from_path - Returns realpath(3) of the given pathname but ignores chroot'ed root |
gen_symlink_name | |
__aafs_profile_mkdir | Requires: @profile->ns->lock held |
aa_str_alloc | |
aa_new_null_profile | aa_new_null_profile - create or find a null-X learning profile*@parent: profile that caused this profile to be created (NOT NULL)*@hat: true if the null- learning profile is a hat*@base: name to base the null profile off of*@gfp: type of allocation |
aa_getprocattr | aa_getprocattr - Return the profile information for @profile*@profile: the profile to print profile info about (NOT NULL)*@string: Returns - string containing the profile info (NOT NULL)* Returns: length of @string on success else error on failure* |
apparmor_setprocattr | |
aa_get_buffer | |
alloc_buffers | |
aa_label_asxprint | aa_label_asxprint - allocate a string buffer and print label into it*@strp: Returns - the allocated buffer with the label name |
report_access | defers execution because cmdline access can sleep |
yama_ptracer_add | yama_ptracer_add - add/replace an exception for this tracer/tracee pair*@tracer: the task_struct of the process doing the ptrace*@tracee: the task_struct of the process to be ptraced* Each tracee can have, at most, one tracer registered. Each time this |
verify_ruleset | |
handle_policy_update | |
get_cert_list | Get a certificate list blob from the named EFI variable. |
uefi_blacklist_hash | Blacklist a hash. |
get_cert_list | Get a certificate list blob from the named secure variable. |
ima_add_digest_entry | ma_add_template_entry helper function:* - Add template entry to the measurement list and hash table, for* all entries except those carried across kexec.* (Called with ima_extend_list_mutex held.) |
ima_lsm_copy_rule | |
init_desc | |
emergency_remount | |
emergency_thaw_all | mergency_thaw_all -- forcibly thaw every frozen filesystem* Used for emergency unfreeze of all filesystems via SysRq |
getname_kernel | |
do_sys_poll | |
__d_alloc | __d_alloc - allocate a dcache entry*@sb: filesystem it will belong to*@name: qstr of the name* Allocates a dentry. It returns %NULL if there is insufficient memory* available. On a success the dentry is returned. The name passed in is |
alloc_fdtable | |
get_mountpoint | |
copy_mount_options | |
single_open | |
simple_xattr_alloc | Allocate new xattr and copy in the value; but leave the name to callers. |
simple_attr_open | simple_attr_open is called by an actual attribute open file operation* to set the attribute specific access operations. |
emergency_sync | |
legacy_parse_param | Add a parameter to a legacy config. We build up a comma-separated list of* options. |
end_buffer_async_read_io | I/O completion handler for block_read_full_page() - pages* which come unlocked at the end of I/O. |
inotify_handle_event | |
inotify_new_group | |
fanotify_encode_fid | |
do_signalfd4 | |
do_eventfd | |
dup_userfaultfd | |
io_ring_ctx_alloc | |
io_alloc_async_ctx | |
fscrypt_fname_alloc_buffer | scrypt_fname_alloc_buffer - allocate a buffer for presented filenames* Allocate a buffer that is large enough to hold any decrypted or encoded* filename (null-terminated), for the given maximum encrypted filename length |
fscrypt_setup_filename | scrypt_setup_filename() - prepare to search a possibly encrypted directory*@dir: the directory that will be searched*@iname: the user-provided filename being searched for*@lookup: 1 if we're allowed to proceed without the key because it's* ->lookup() or |
__fscrypt_encrypt_symlink | |
setup_v1_file_key_derived | v1 policy, !DIRECT_KEY: derive the file's encryption key |
build_merkle_tree | Build the Merkle tree for the given inode using the given parameters, and* return the root hash in @root_hash.* The tree is written to a filesystem-specific location as determined by the* ->write_merkle_tree_block() method |
fsverity_prepare_hash_state | sverity_prepare_hash_state() - precompute the initial hash state*@alg: hash algorithm*@salt: a salt which is to be prepended to all data to be hashed*@salt_size: salt size in bytes, possibly 0* Return: NULL if the salt is empty, otherwise the kmalloc()'ed |
ensure_verity_info | Ensure the inode has an ->i_verity_info |
create_entry | This registers a new binary format, it recognises the syntax* ':name:type:offset:magic:mask:interpreter:flags'* where the ':' is the IFS, that can be chosen with the first char |
load_elf_phdrs | load_elf_phdrs() - load ELF program headers*@elf_ex: ELF header of the binary whose program headers should be loaded*@elf_file: the opened ELF binary file* Loads ELF program headers from the binary file elf_file, which has the ELF |
load_elf_binary | |
elf_fdpic_fetch_phdrs | ad the program headers table into memory |
load_elf_fdpic_binary | load an fdpic binary into various bits of memory |
posix_acl_alloc | Allocate a new ACL with the specified number of entries. |
cn_print_exe_file | |
do_sys_name_to_handle | |
handle_to_path | |
iomap_page_create | |
iomap_dio_rw | map_dio_rw() always completes O_[D]SYNC writes regardless of whether the IO* is being issued as AIO or not. This allows us to optimise pure data writes* to use REQ_FUA rather than requiring generic_write_sync() to issue a* REQ_FLUSH post write |
v2_read_file_info | Read information header from quota file |
getdqbuf | |
do_lookup_dcookie | And here is where the userspace process can look up the cookie value* to retrieve the path. |
dcookie_init | |
dcookie_register | |
ahash_request_alloc | ahash_request_alloc() - allocate request data structure*@tfm: cipher handle to be registered with the request*@gfp: memory allocation flag that is handed to kmalloc by the API call.* Allocate the request data structure that must be used with the ahash |
kmalloc_array | 分配数组内存 |
kzalloc | 分配内存并置零 |
acpi_os_allocate | The irqs_disabled() check is for resume from RAM.* Interrupts are off during resume, just like they are for boot.* However, boot has (system_state != SYSTEM_RUNNING)* to quiet __might_sleep() in kmalloc() and resume does not. |
kpp_request_alloc | kpp_request_alloc() - allocates kpp request*@tfm: KPP tfm handle allocated with crypto_alloc_kpp()*@gfp: allocation flags* Return: allocated handle in case of success or NULL in case of an error. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |