函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_print_header - Get header line of audit log.*@r: Pointer to "struct tomoyo_request_info".* Returns string representation.* This function uses kmalloc(), so caller must kfree() if this function* didn't return NULL.

函数原型:static char *tomoyo_print_header(struct tomoyo_request_info *r)

返回类型:char

参数:

类型参数名称
struct tomoyo_request_info *r
153  gpid等于task_pid_nr(当前进程)
154  obj等于For holding parameters specific to operations which deal files.* NULL if not dealing files.
155  tomoyo_buffer_len等于4096
156  buffer等于开辟内存
160  如果非buffer则返回:NULL
163  tomoyo_convert_time(ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems., & stamp)
165  pos等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
179  如果非obj则转到:no_obj_info
181  如果非* True if tomoyo_get_attributes() was already called, false otherwise.
182  tomoyo_get_attributes(obj)
183  * True if tomoyo_get_attributes() was already called, false otherwise. = true
185 i小于TOMOYO_MAX_PATH_STAT循环
190  如果非 True if @stat[] is valid. [i]则继续下一循环
192  stat等于* Information on @path1, @path1's parent directory, @path2, @path2's * parent directory.[i]
193  dev等于dev
194  mode等于mode
195  如果i按位与1则
204  继续下一循环
206  pos加等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
214  如果S_ISCHR(mode)或S_ISBLK(mode)则
215  dev等于rdev
221  pos加等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
224  no_obj_info :
225  如果pos小于tomoyo_buffer_len减1则返回:buffer
227  释放内存
228  返回:NULL
调用者
名称描述
tomoyo_init_logmoyo_init_log - Allocate buffer for audit logs