函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dump_common_audit_data - helper to dump common audit data*@a : common audit data

函数原型:static void dump_common_audit_data(struct audit_buffer *ab, struct common_audit_data *a)

返回类型:void

参数:

类型参数名称
struct audit_buffer *ab
struct common_audit_data *a
218  BUILD_BUG_ON - break compile if a condition is true(u的长度 > *的长度 * 2)
220  写入审计信息
221  audit_log_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@string: string to be logged* Same as audit_log_n_untrustedstring(), except that strlen is used to* determine string length.
224  :type恒等于LSM_AUDIT_DATA_NONE
225  返回
226  :type恒等于LSM_AUDIT_DATA_IPC
227  写入审计信息
228  退出
229  :type恒等于LSM_AUDIT_DATA_CAP
230  写入审计信息
231  退出
232  :type恒等于LSM_AUDIT_DATA_PATH
235  This is a helper-function to print the escaped d_path
237  inode等于d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
238  如果inode
243  退出
245  :type恒等于LSM_AUDIT_DATA_FILE
248  This is a helper-function to print the escaped d_path
250  inode等于file_inode(file)
251  如果inode
256  退出
258  :type恒等于LSM_AUDIT_DATA_IOCTL_OP
261  This is a helper-function to print the escaped d_path
263  inode等于 Where the name belongs to - NULL is * negative
264  如果inode
270  写入审计信息
271  退出
273  :type恒等于LSM_AUDIT_DATA_DENTRY
276  写入审计信息
277  audit_log_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@string: string to be logged* Same as audit_log_n_untrustedstring(), except that strlen is used to* determine string length.
279  inode等于d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
280  如果inode
285  退出
287  :type恒等于LSM_AUDIT_DATA_INODE
291  inode等于inode
292  dentry等于获取索引节点在哈希表中的别名
293  如果dentry
297  dput(dentry)
299  写入审计信息
300  audit_log_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@string: string to be logged* Same as audit_log_n_untrustedstring(), except that strlen is used to* determine string length.
301  写入审计信息
302  退出
304  :type恒等于LSM_AUDIT_DATA_TASK
305  tsk等于tsk
306  如果tsk
307  pid等于task_tgid_nr(tsk)
308  如果pid
315  退出
317  :type恒等于LSM_AUDIT_DATA_NET
318  如果sk
319  sk等于sk
322  len等于0
323  char * p = NULL
327  inet等于inet_sk(sk)
329  print_ipv4_addr(ab, inet_rcv_saddr, inet_sport, "laddr", "lport")
332  print_ipv4_addr(ab, inet_daddr, inet_dport, "faddr", "fport")
335  退出
338  :sk_family恒等于IP version 6
339  inet等于inet_sk(sk)
341  print_ipv6_addr(ab, & sk_v6_rcv_saddr, inet_sport, "laddr", "lport")
344  print_ipv6_addr(ab, & sk_v6_daddr, inet_dport, "faddr", "fport")
347  退出
350  :sk_family恒等于Unix domain sockets
351  u等于unix_sk(sk)
352  addr等于smp_load_acquire( & addr)
353  如果非addr退出
355  如果dentry
357  退出
359  len等于lensizeof(short)
360  p等于 pathname [0]
361  写入审计信息
362  如果paudit_log_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@string: string to be logged* Same as audit_log_n_untrustedstring(), except that strlen is used to* determine string length.
364  否则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
366  退出
372  print_ipv4_addr(ab, saddr, sport, "saddr", "src")
375  print_ipv4_addr(ab, daddr, dport, "daddr", "dest")
378  退出
379  :family恒等于IP version 6
380  print_ipv6_addr(ab, & saddr, sport, "saddr", "src")
383  print_ipv6_addr(ab, & daddr, dport, "daddr", "dest")
386  退出
388  如果netif大于0则
393  如果dev
398  退出
400  :type恒等于LSM_AUDIT_DATA_KEY
401  写入审计信息
402  如果key_desc
406  退出
408  :type恒等于LSM_AUDIT_DATA_KMOD
409  写入审计信息
410  audit_log_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@string: string to be logged* Same as audit_log_n_untrustedstring(), except that strlen is used to* determine string length.
411  退出
412  :type恒等于LSM_AUDIT_DATA_IBPKEY
415  memset( & s6_addr, 0, s6_addr的长度)
417  memcpy( & s6_addr, & subnet_prefix, subnet_prefix的长度)
419  写入审计信息
421  退出
423  :type恒等于LSM_AUDIT_DATA_IBENDPORT
424  写入审计信息
427  退出
调用者
名称描述
common_lsm_auditmmon_lsm_audit - generic LSM auditing function*@a: auxiliary audit data*@pre_audit: lsm-specific pre-audit callback*@post_audit: lsm-specific post-audit callback* setup the audit buffer for common security information* uses callback to print LSM specific