函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_domain_quota_is_ok - Check for domain's quota.*@r: Pointer to "struct tomoyo_request_info".* Returns true if the domain is not exceeded quota, false otherwise.* Caller holds tomoyo_read_lock().

函数原型:bool tomoyo_domain_quota_is_ok(struct tomoyo_request_info *r)

返回类型:bool

参数:

类型参数名称
struct tomoyo_request_info *r
1024  count等于0
1025  domain等于domain
1028  如果One of tomoyo_mode_index . 不等于TOMOYO_CONFIG_LEARNING则返回:false
1030  如果非domain则返回:true
1037  如果 true or false or TOMOYO_GC_IN_PROGRESS 则继续下一循环
1040  : One of values in "enum tomoyo_acl_entry_type_index". 恒等于TOMOYO_TYPE_PATH_ACL
1041  perm = ({
1042  __mptr等于ptr
1042  循环
1042  当0循环
1042  })->perm
1043  退出
1044  : One of values in "enum tomoyo_acl_entry_type_index". 恒等于TOMOYO_TYPE_PATH2_ACL
1045  perm = ({
1046  __mptr等于ptr
1046  循环
1046  当0循环
1046  })->perm
1047  退出
1048  : One of values in "enum tomoyo_acl_entry_type_index". 恒等于TOMOYO_TYPE_PATH_NUMBER_ACL
1049  perm = ({
1050  __mptr等于ptr
1050  循环
1050  当0循环
1050  })->perm
1051  退出
1052  : One of values in "enum tomoyo_acl_entry_type_index". 恒等于TOMOYO_TYPE_MKDEV_ACL
1053  perm = ({
1054  __mptr等于ptr
1054  循环
1054  当0循环
1054  })->perm
1055  退出
1056  : One of values in "enum tomoyo_acl_entry_type_index". 恒等于TOMOYO_TYPE_INET_ACL
1057  perm = ({
1058  __mptr等于ptr
1058  循环
1058  当0循环
1058  })->perm
1059  退出
1060  : One of values in "enum tomoyo_acl_entry_type_index". 恒等于TOMOYO_TYPE_UNIX_ACL
1061  perm = ({
1062  __mptr等于ptr
1062  循环
1062  当0循环
1062  })->perm
1063  退出
1064  : One of values in "enum tomoyo_acl_entry_type_index". 恒等于TOMOYO_TYPE_MANUAL_TASK_ACL
1065  perm等于0
1066  退出
1067  默认
1068  perm等于1
1070 i小于16循环如果perm按位与1左移i位则
1072  count自加
1074  如果count小于pref[TOMOYO_PREF_MAX_LEARNING_ENTRY]则返回:true
1077  如果非flags[TOMOYO_DIF_QUOTA_WARNED]则
1078  flags[TOMOYO_DIF_QUOTA_WARNED] = true
1080  moyo_write_log - Write an audit log.*@r: Pointer to "struct tomoyo_request_info".*@fmt: The printf()'s format string, followed by parameters.* Returns nothing.
1082  打印警告信息("WARNING: Domain '%s' has too many ACLs to hold. Stopped learning mode.\n", name)
1086  返回:false
调用者
名称描述
tomoyo_supervisormoyo_supervisor - Ask for the supervisor's decision