函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\util.c Create Date:2022-07-27 15:45:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error

函数原型:char *kstrdup(const char *s, gfp_t gfp)

返回类型:char

参数:

类型参数名称
const char *s
gfp_tgfp
56  如果非s则返回:NULL
59  len等于strlen(s)加1
60  buf等于kmalloc_track_caller(len, gfp)
61  如果buf内存复制(buf, s, len)
63  返回:buf
调用者
名称描述
kstrdup_quotable_fileReturns allocated NULL-terminated string containing pathname,* with special characters escaped, able to be safely logged. If* there is an error, the leading character will be "<".
dynamic_debug_init
__irq_domain_add__irq_domain_add() - Allocate a new irq_domain data structure*@fwnode: firmware node for the interrupt controller*@size: Size of linear map; 0 for radix mapping only*@hwirq_max: Maximum number of interrupts supported by controller*@direct_max: Maximum
irq_debugfs_copy_devname
klp_alloc_object_dynamic
klp_alloc_func_nop
setup_modinfo_version
setup_modinfo_srcversion
cgroup1_release_agentNotify 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
audit_dupe_lsm_fieldDuplicate LSM field information. The lsm_rule is opaque, so must be* re-initialized.
audit_dupe_ruleDuplicate an audit rule. This will be a deep copy with the exception* of the watch - that pointer is carried over. The LSM specific fields* will be updated in the copy. The point is to be able to replace the old
audit_filter_rulesCompare a task_struct with an audit_rule. Return 1 on match, 0* otherwise.* If task_creation is true, this is an explicit indication that we are* filtering a task rule at task creation time. This and tsk == current are
audit_filter_taskAt process creation time, we can determine if system-call auditing is* completely disabled for this task. Since we only have the task* structure at this point, we can only check uid and gid.
__audit_log_kern_module
audit_dupe_watchDuplicate the given audit watch. The new watch's rules list is initialized* to an empty list and wlist is undefined.
audit_dupe_exe
link_targetGiven a string representing a file path of format:* path/to/file.gcda* construct and return a new string:* path/to/file.
add_nodeCreate a node for a given profiling data set and add it to all lists and* debugfs. Needs to be called with node_lock held.
gcov_info_dupgcov_info_dup - duplicate profiling data set*@info: profiling data set to duplicate* Return newly allocated duplicate on success, %NULL on error.
gcov_info_dupgcov_info_dup - duplicate profiling data set*@info: profiling data set to duplicate* Return newly allocated duplicate on success, %NULL on error.
llvm_gcda_emit_function
gcov_fn_info_dup
gcov_info_dupgcov_info_dup - duplicate profiling data set*@info: profiling data set to duplicate* Return newly allocated duplicate on success, %NULL on error.
fei_attr_new
trace_array_create
process_system_preds
create_filter_start
set_trigger_filterset_trigger_filter - Generic event_command @set_filter implementation*@filter_str: The filter string for the trigger, NULL to remove filter*@trigger_data: Trigger-specific data*@file: The trace_event_file associated with the event* Common implementation
save_named_triggersave_named_trigger - save the trigger in the named trigger list*@name: The name of the named trigger set*@data: The trigger data to save* Return: 0 if successful, negative error otherwise.
alloc_synth_tracepoint
register_synth_event
alloc_synth_event
parse_action
parse_assignment
parse_hist_trigger_attrs
create_hist_field
init_var_ref
parse_field
parse_unary
parse_expr
create_field_var_histreate_field_var_hist - Automatically create a histogram and var for a field*@target_hist_data: The target hist trigger*@subsys_name: Optional subsystem name*@event_name: Optional event name*@field_name: The name of the field (and the resulting variable)*
create_var
parse_action_params
action_parse
track_data_parse
trace_action_create
action_create
onmatch_parse
parse_var_defs
alloc_trace_kprobeAllocate new trace_probe and initialize it (including kprobes).
trace_kprobe_create
parse_probe_argRecursive argument parser
traceprobe_parse_probe_arg_bodyString length checking wrapper
trace_probe_init
trace_uprobe_create
bpf_symlink
perf_event_parse_addr_filterAddress filter string parser
do_name
kstrdup_constkstrdup_const - conditionally duplicate an existing const string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Note: Strings allocated by kstrdup_const should be freed by kfree_const.
zs_create_poolzs_create_pool - Creates an allocation pool to work from.*@name: pool name to be created* This function must be called before anything when using* the zsmalloc allocator.* On success, a pointer to the newly created pool is returned,* otherwise NULL.
lsm_append
securityfs_create_symlinksecurityfs_create_symlink - create a symlink in the securityfs filesystem*@name: a pointer to a string containing the name of the symlink to* create.*@parent: a pointer to the parent dentry for the symlink. This should be a* directory dentry if set
selinux_fs_context_dup
smack_fs_context_dupsmack_fs_context_dup - Duplicate the security data on fs_context duplication*@fc: The new filesystem context.*@src_fc: The source filesystem context being duplicated.* Returns 0 on success or -ENOMEM on error.
smack_inode_init_securitysmack_inode_init_security - copy out the smack from an inode*@inode: the newly created inode*@dir: containing directory object*@qstr: unused*@name: where to put the attribute name*@value: where to put the attribute value*@len: where to put the length of
smack_inode_getsecuritysmack_inode_getsecurity - get smack xattrs*@inode: the object*@name: attribute name*@buffer: where to put the result*@alloc: duplicate memory* Returns the size of the attribute or an error code
smack_getprocattrsmack_getprocattr - Smack process attribute access*@p: the object task*@name: the name of the attribute in /proc/.../attr*@value: where to put the result* Places a copy of the task Smack into value* Returns the length of the smack label or an error code
smack_key_getsecuritysmack_key_getsecurity - Smack label tagging the key*@key points to the key to be queried*@_buffer points to a pointer that should be set to point to the* resulting string (if no label or an error occurs)
verify_headerverify_head - unpack serialized stream header*@e: serialized data read head (NOT NULL)*@required: whether the header is required or optional*@ns: Returns - namespace if one is specified else NULL (NOT NULL)* Returns: error or 0 if header is good
handle_policy_update
ima_lsm_copy_rule
ima_parse_rule
restore_template_fmt
simple_xattr_setsimple_xattr_set - xattr SET operation for in-memory/pseudo filesystems*@xattrs: target simple_xattr list*@name: name of the extended attribute*@value: value of the xattr
logfclogfc - Log a message to a filesystem context*@fc: The filesystem context to log to.*@fmt: The format of the buffer.
kobject_set_name_vargs设置kobject名字
call_modprobe
dir_add
cmdline_parts_parse
ordered_lsm_parsePopulate ordered LSMs list from comma-separated LSM name list.
bprm_change_interp