Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\auditsc.c Create Date:2022-07-28 11:27:20
Last Modify:2020-03-17 16:31:21 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:audit_log_execve_info

Proto:static void audit_log_execve_info(struct audit_context *context, struct audit_buffer **ab)

Type:void

Parameter:

TypeParameterName
struct audit_context *context
struct audit_buffer **ab
994  len_abuf = 0
1002  __user * p = arg_start
1013  WARN_ON_ONCE( execve audit message should be longer than this (userspace limits),* see the note near the top of audit_log_execve_info() about this value > 7500)
1014  len_max = execve audit message should be longer than this (userspace limits),* see the note near the top of audit_log_execve_info() about this value
1017  buf_head = Allocation memory
1018  If Not buf_head Then
1019  audit_panic("out of memory for argv string")
1020  Return
1022  buf = buf_head
1024  audit_log_format - format a message into the audit buffer.*@ab: audit_buffer*@fmt: format string*@...: optional parameters matching @fmt string* All the work is done in audit_log_vformat.
1026  len_rem = len_max
1027  len_buf = 0
1028  len_full = 0
1029  require_data = true
1030  encode = false
1031  iter = 0
1032  arg = 0
1033  Do
1041  If len_full == 0 Then len_full = Get the size of a string in user space - 1
1045  If require_data Then
1047  If buf != buf_head Then
1049  buf = buf_head
1055  If len_tmp == -EFAULT Then
1058  Go to out
1059  Else if len_tmp == len_max - len_buf Then
1061  require_data = true
1066  encode = true
1067  len_full = len_full * 2
1068  p += len_tmp
1069  Else
1080  len_buf += len_tmp
1081  buf_head[len_buf] = '\0'
1084  len_abuf = If encode Then len_buf * 2 Else len_buf + 2
1088  If len_buf >= 0 Then
1093  If size of abuf + 8 > len_rem Then
1103  len_tmp = 0
1104  If require_data || iter > 0 || len_abuf + size of abuf > len_rem Then
1119  WARN_ON(len_tmp >= size of abuf )
1120  abuf[ size of abuf - 1] = '\0'
1124  len_rem -= len_tmp
1125  len_tmp = len_buf
1126  If encode Then
1132  Else
1141  len_buf -= len_tmp
1142  buf += len_tmp
1146  If len_buf == 0 && Not require_data Then
1147  arg++
1148  iter = 0
1149  len_full = 0
1150  require_data = true
1151  encode = false
1153  When arg < argc cycle
1157  out :
1158  kfree(buf_head)
Caller
NameDescribe
show_special