Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\audit_fsnotify.c Create Date:2022-07-28 11:29:46
Last Modify:2020-03-17 18:09:23 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:audit_alloc_mark

Proto:struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pathname, int len)

Type:struct audit_fsnotify_mark

Parameter:

TypeParameterName
struct audit_krule *krule
char *pathname
intlen
82  If pathname[0] != '/' || pathname[len - 1] == '/' Then Return ERR_PTR( - EINVAL)
85  dentry = kern_path_locked(pathname, & path)
86  If IS_ERR(dentry) Then Return dentry
88  inode = Where the name belongs to - NULL is * negative
89  inode_unlock(inode)
91  audit_mark = 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).
92  If Value for the false possibility is greater at compile time(!audit_mark) Then
93  audit_mark = ERR_PTR( - ENOMEM)
94  Go to out
97  Nothing fancy, just initialize lists and locks and counters.
98  Mask this mark is for [mark->lock, group->mark_mutex] = snotify events we care about.
99  sertion path = pathname
100  audit_update_mark(audit_mark, Where the name belongs to - NULL is * negative )
101  rule = krule
103  ret = fsnotify_add_inode_mark( & snotify mark on the inode , inode, true)
104  If ret < 0 Then
105  fsnotify_put_mark( & snotify mark on the inode )
106  audit_mark = ERR_PTR(ret)
108  out :
109  dput(dentry)
110  path_put( & path)
111  Return audit_mark
Caller
NameDescribe
audit_data_to_entryTranslate struct audit_rule_data to kernel's rule representation.
audit_dupe_exe