Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:audit_alloc_name

Proto:static struct audit_names *audit_alloc_name(struct audit_context *context, unsigned char type)

Type:struct audit_names

Parameter:

TypeParameterName
struct audit_context *context
unsigned chartype
1825  If al records in names_list < AUDIT_NAMES is the number of slots we reserve in the audit_context* for saving names from getname(). If we get more names we will allocate* a name dynamically and also add those to the list anchored by names_list. Then
1826  aname = The names_list is the list of all audit_names collected during this* syscall. The first AUDIT_NAMES entries in the names_list will* actually be from the preallocated_names array for performance* reasons[al records in names_list ]
1827  memset(aname, 0, size of aname )
1828  Else
1829  aname = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1830  If Not aname Then Return NULL
1832  This was an allocated audit_names and not from the array of* names allocated in the task audit context. Thus this name* should be freed on syscall exit. = true
1835  ino = AUDIT_INO_UNSET
1836  cord type = type
1837  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
1839  al records in names_list ++
1840  Return aname
Caller
NameDescribe
__audit_getname__audit_getname - add a name to the list*@name: name to add* Add a name to the list of audit names for this context.* Called from fs/namei.c:getname().
__audit_inode__audit_inode - store the inode and device from a lookup*@name: name being audited*@dentry: dentry being audited*@flags: attributes for this particular entry
__audit_inode_child__audit_inode_child - collect inode info for created/removed objects*@parent: inode of dentry parent*@dentry: dentry being audited*@type: AUDIT_TYPE_* value that we're looking for* For syscalls that create or remove filesystem objects, audit_inode