Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:audit_register_class

Proto:int __init audit_register_class(int class, unsigned *list)

Type:int

Parameter:

TypeParameterName
intclass
unsigned *list
167  p = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
168  If Not p Then Return -ENOMEM
170  When list != ~0U cycle
171  n = list++
172  If n >= AUDIT_BITMASK_SIZE * 32 - AUDIT_SYSCALL_CLASSES Then
173  kfree(p)
174  Return -EINVAL
176  p[AUDIT_WORD(n)] |= AUDIT_BIT(n)
178  If class >= AUDIT_SYSCALL_CLASSES || classes[class] Then
179  kfree(p)
180  Return -EINVAL
182  classes[class] = p
183  Return 0
Caller
NameDescribe
audit_classes_init
audit_classes_init