函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tracing_mark_raw_write

函数原型:static ssize_t tracing_mark_raw_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *fpos)

返回类型:ssize_t

参数:

类型参数名称
struct file *filp
const char __user *ubuf
size_tcnt
loff_t *fpos
6553  tr等于 needed for tty driver, and maybe others
6564  如果Kill all tracing for good (never come back).* It is initialized to 1 but will turn to zero if the initialization* of the tracer is successful. But that is the only place that sets* this back to zero.则返回:负EINVAL
6567  如果非trace_flags按位与TRACE_ITER_MARKERS的值则返回:负EINVAL
6571  如果cnt小于sizeof(unsignedint)或cnt大于Limit it for now to 3K (including tag) 则返回:负EINVAL
6574  如果cnt大于TRACE_BUF_SIZEcnt等于TRACE_BUF_SIZE
6577  BUILD_BUG_ON - break compile if a condition is true(TRACE_BUF_SIZE >= PAGE_SIZE)
6579  local_save_flags(irq_flags)
6580  size等于entry的长度加cnt
6581  如果cnt小于FAULT_SIZE_IDsize加等于FAULT_SIZE_IDcnt
6584  buffer等于buffer
6585  event等于__trace_buffer_lock_reserve(buffer, TRACE_RAW_DATA, size, irq_flags, 抢占计数值)
6587  如果非event则返回:负EBADF
6591  entry等于g_buffer_event_data - return the data of the event*@event: the event to get the data from
6593  len等于Architectures should provide two primitives (raw_copy_{to,from}_user())* and get rid of their private instances of copy_{to,from}_user() and* __copy_{to,from}_user{,_inatomic}().* raw_copy_{to,from}_user(to, from, size) should copy up to size bytes and
6594  如果len
6595  id等于负1
6596  内存复制( & buf, Used in tracing_mark_raw_write() as well , '\0' is already accounted for )
6597  written等于负EFAULT
6598  否则written等于cnt
6601  __buffer_unlock_commit(buffer, event)
6603  如果written大于0则fpos加等于written
6606  返回:written