函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns allocated NULL-terminated string containing process* command line, with inter-argument NULLs replaced with spaces,* and other special characters escaped.

函数原型:char *kstrdup_quotable_cmdline(struct task_struct *task, gfp_t gfp)

返回类型:char

参数:

类型参数名称
struct task_struct *task
gfp_tgfp
602  buffer等于kmalloc(PAGE_SIZE, GFP_KERNEL)
603  如果非buffer则返回:NULL
606  res等于get_cmdline() - copy the cmdline value to a buffer.*@task: the task whose cmdline value to copy.*@buffer: the buffer to copy to.*@buflen: the length of the buffer. Larger cmdline values are truncated* to this length.
607  buffer[res]等于'\0'
610 res先自减大于等于0且buffer[res]恒等于'\0'循环
614 i小于等于res循环如果buffer[i]恒等于'\0'则
616  buffer[i]等于' '
619  quoted等于Return an allocated string that has been escaped of special characters* and double quotes, making it safe to log in quotes.
620  kfree(buffer)
621  返回:quoted
调用者
名称描述
__report_access
report_load