函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:And here is where the userspace process can look up the cookie value* to retrieve the path.

函数原型:static int do_lookup_dcookie(u64 cookie64, char __user *buf, size_t len)

返回类型:int

参数:

类型参数名称
u64cookie64
char __user *buf
size_tlen
152  cookie等于cookie64
153  err等于负EINVAL
162  如果非操作权限检查则返回:负EPERM
165  mutex_lock( & dcookie_mutex)
167  如果非is_live()则
168  err等于负EINVAL
169  转到:out
172  如果非dcs等于find_dcookie(cookie)则转到:out
175  err等于负ENOMEM
176  kbuf等于开辟内存
177  如果非kbuf则转到:out
181  path等于d_path - return the path of a dentry*@path: path to report*@buf: buffer to return value in*@buflen: buffer length* Convert a dentry into an ASCII path name
183  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
185  如果是错误
186  err等于错误
187  转到:out_free
190  err等于负ERANGE
192  pathlen等于kbufPAGE_SIZEpath
193  如果pathlen小于等于len
194  err等于pathlen
195  如果copy_to_user(buf, path, pathlen)则err等于负EFAULT
199  out_free :
200  释放内存
201  返回:err
202  out :
203  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
204  返回:err
调用者
名称描述
SYSCALL_DEFINE3
COMPAT_SYSCALL_DEFINE4