Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\audit.c Create Date:2022-07-28 11:23:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:void audit_log_n_hex(struct audit_buffer *ab, const unsigned char *buf, size_t len)

Type:void

Parameter:

TypeParameterName
struct audit_buffer *ab
const unsigned char *buf
size_tlen
1913  If Not ab Then Return
1916  BUG_ON(!rmatted skb ready to send )
1917  skb = rmatted skb ready to send
1918  avail = skb_tailroom - bytes at buffer end*@skb: buffer to check* Return the number of bytes of free space at the tail of an sk_buff
1919  new_len = len << 1
1920  If new_len >= avail Then
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_len - avail) / 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  If Not avail Then Return
1928  ptr = skb_tail_pointer(skb)
1929  When i < len cycle ptr = hex_byte_pack_upper(ptr, buf[i])
1931  ptr = 0
1932  add data to a buffer
Caller
NameDescribe
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