函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:audit_mount - handle the auditing of mount operations*@profile: the profile being enforced (NOT NULL)*@op: operation being mediated (NOT NULL)*@name: name of object being mediated (MAYBE NULL)*@src_name: src_name of object being mediated

函数原型:static int audit_mount(struct aa_profile *profile, const char *op, const char *name, const char *src_name, const char *type, const char *trans, unsigned long flags, const void *data, unsigned int request, struct aa_perms *perms, const char *info, int error)

返回类型:int

参数:

类型参数名称
struct aa_profile *profile
const char *op
const char *name
const char *src_name
const char *type
const char *trans
unsigned longflags
const void *data
unsigned intrequest
struct aa_perms *perms
const char *info
interror
136  audit_type等于AUDIT_APPARMOR_AUTO
137  TODO: cleanup audit init so we don't need _aad = {0,} (sa, LSM_AUDIT_DATA_NONE, op)
139  如果此条件成立可能性大(为编译器优化)(!error)则
140  mask等于 set only when allow is set
142  如果此条件成立可能性小(为编译器优化)(AUDIT_MODE(profile) == AUDIT_ALL)则mask等于0xffff
146  request与等于mask
148  如果此条件成立可能性大(为编译器优化)(!request)则返回:0
150  audit_type等于AUDIT_APPARMOR_AUDIT
151  否则
153  request等于request按位与allow的反
155  如果request按位与 set only when ~allow | deny audit_type等于AUDIT_APPARMOR_KILL
159  如果request按位与 set only when ~allow | deny AUDIT_MODE(profile)不等于 do not quiet audit messages AUDIT_MODE(profile)不等于AUDIT_ALLrequest与等于 set only when ~allow | deny 的反
164  如果非request则返回:error
168  name等于name
169  src_name等于src_name
170  type等于type
171  trans等于trans
172  flags等于flags
173  如果data set only when allow is set 按位与AA_AUDIT_DATAdata等于data
175  info等于info
176  error等于error
178  返回:aa_audit - Log a profile based audit event to the audit subsystem*@type: audit type for the message*@profile: profile to check against (NOT NULL)*@sa: audit event (NOT NULL)*@cb: optional callback fn for type specific fields (MAYBE NULL)* Handle default
调用者
名称描述
match_mnt_path_strmatch_mnt_path_str - handle path matching for mount*@profile: the confining profile*@mntpath: for the mntpnt (NOT NULL)*@buffer: buffer to be used to lookup mntpath*@devnme: string for the devname/src_name (MAY BE NULL OR ERRPTR)*@type: string for the dev
profile_umount
build_pivotroothelper fn for transition on pivotroot* Returns: label for transition or ERR_PTR. Does not return NULL
aa_pivotroot