函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:audit_log_n_hex - convert a buffer to hex and append it to the audit skb*@ab: the audit_buffer*@buf: buffer to convert to hex*@len: length of @buf to be converted* No return value; failure to expand is silently ignored

函数原型:void audit_log_n_hex(struct audit_buffer *ab, const unsigned char *buf, size_t len)

返回类型:void

参数:

类型参数名称
struct audit_buffer *ab
const unsigned char *buf
size_tlen
1913  如果非ab则返回
1916  BUG_ON(!rmatted skb ready to send )
1917  skb等于rmatted skb ready to send
1918  avail等于缓存区尾部字节
1919  new_len等于len左移1位
1920  如果new_len大于等于avail
1922  new_len等于AUDIT_BUFSIZ is the size of the temporary buffer used for formatting* audit records. Since printk uses a 1024 byte buffer, this buffer* should be at least that large. new_lenavail的差除AUDIT_BUFSIZ is the size of the temporary buffer used for formatting* audit records. Since printk uses a 1024 byte buffer, this buffer* should be at least that large. 加1的和
1923  avail等于audit_expand - expand skb in the audit buffer*@ab: audit_buffer*@extra: space to add at tail of the skb* Returns 0 (no space) on failed expansion, or available space if* successful.
1924  如果非avail则返回
1928  ptr等于skb_tail_pointer(skb)
1929 i小于len循环ptr等于hex_byte_pack_upper(ptr, buf[i])
1931  ptr等于0
1932  设置数据在缓存区
调用者
名称描述
audit_log_n_untrustedstringaudit_log_n_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@len: length of string (not including trailing null)*@string: string to be logged* This code will escape a string that is passed to it if the string* contains
audit_log_execve_info
audit_log_exit
aa_label_xaudit
dump_common_audit_datadump_common_audit_data - helper to dump common audit data*@a : common audit data