函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:trace_parse_run_command

函数原型:ssize_t trace_parse_run_command(struct file *file, const char __user *buffer, size_t count, loff_t *ppos, int (*createfn)(int , char **))

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buffer
size_tcount
loff_t *ppos
int (*createfn
9190  ret等于0
9191  done等于0
9194  kbuf等于开辟内存
9195  如果非kbuf则返回:负ENOMEM
9198 done小于count循环
9199  size等于countdone
9201  如果size大于等于WRITE_BUFSIZEsize等于WRITE_BUFSIZE减1
9204  如果copy_from_user(kbuf, buffer + done, size)则
9205  ret等于负EFAULT
9206  转到:out
9208  kbuf[size]等于'\0'
9209  buf等于kbuf
9210  循环
9212  如果tmp
9213  tmp等于'\0'
9214  size等于tmpbuf加1
9215  否则
9217  如果donesize小于count
9218  如果buf不等于kbuf退出
9221  打印警告信息("Line length is too long: Should be less than %d\n", WRITE_BUFSIZE - 2)
9223  ret等于负EINVAL
9224  转到:out
9227  done加等于size
9232  如果tmptmp等于'\0'
9236  如果ret则转到:out
9238  buf加等于size
9240 done小于count循环
9242  ret等于done
9244  out :
9245  kfree(kbuf)
9247  返回:ret
调用者
名称描述
synth_events_write
probes_write
dyn_event_write
probes_write