Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\string_helpers.c Create Date:2022-07-28 06:25:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:char *kstrdup_quotable_cmdline(struct task_struct *task, gfp_t gfp)

Type:char

Parameter:

TypeParameterName
struct task_struct *task
gfp_tgfp
602  buffer = kmalloc(PAGE_SIZE, GFP_KERNEL)
603  If Not buffer Then Return 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  When --res >= 0 && buffer[res] == '\0' cycle
614  When i <= res cycle If buffer[i] == '\0' Then
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  Return quoted
Caller
NameDescribe
__report_access
report_load