Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:04:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:getname_kernel

Proto:struct filename *getname_kernel(const char *filename)

Type:struct filename

Parameter:

TypeParameterName
const char *filename
216  len = strlen - Find the length of a string*@s: The string to be sized + 1
218  result = __getname()
219  If Value for the false possibility is greater at compile time(!result) Then Return ERR_PTR( - ENOMEM)
222  If 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). Then
223  pointer to actual string = iname
224  Else if len <= # chars in a path name including nul Then
225  size = offsetof(structfilename, iname[1])
228  tmp = Allocation memory
230  __putname(result)
231  Return ERR_PTR( - ENOMEM)
233  pointer to actual string = result
234  result = tmp
235  Else
236  __putname(result)
237  Return ERR_PTR( - ENAMETOOLONG)
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  Return result
Caller
NameDescribe
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