函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-29 10:34:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:getname_kernel

函数原型:struct filename *getname_kernel(const char *filename)

返回类型:struct filename

参数:

类型参数名称
const char *filename
216  len等于strlen - Find the length of a string*@s: The string to be sized加1
218  result等于__getname()
219  如果此条件成立可能性小(为编译器优化)(!result)则返回:错误号
222  如果len小于等于In order to reduce some races, while at the same time doing additional* checking and hopefully speeding things up, we copy filenames to the* kernel data space before using them..* POSIX.1 2.4: an empty pathname is invalid (ENOENT).
223  pointer to actual string 等于iname
224  否则如果len小于等于# chars in a path name including nul
225  size等于offsetof(structfilename, iname[1])
228  tmp等于开辟内存
230  __putname(result)
231  返回:错误号
233  pointer to actual string 等于result
234  result等于tmp
235  否则
236  __putname(result)
237  返回:错误号
239  memcpy((char * ) pointer to actual string , filename, len)
240  original userland pointer = NULL
241  aname = NULL
242  refcnt等于1
243  audit_getname(result)
245  返回:result
调用者
名称描述
open_exec
kern_path_lockeddoes lookup, returns the object with parent locked
kern_path
vfs_path_lookupvfs_path_lookup - lookup a file path relative to a dentry-vfsmount pair*@dentry: pointer to dentry of the base directory*@mnt: pointer to vfs mount of the base directory*@name: pointer to file name*@flags: lookup flags*@path: pointer to struct path to fill
kern_path_mountpoint
do_file_open_root
kern_path_create
fs_lookup_params_lookup_param - Look up a path referred to by a parameter*@fc: The filesystem context to log errors through.*@param: The parameter.*@want_bdev: T if want a blockdev*@_path: The result of the lookup
do_coredump
call_usermodehelper_exec_asyncThis is the task which runs the usermode application
run_init_process