函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_commit_ok - Check memory quota.*@data: Data to copy from.*@size: Size in byte.* Returns pointer to allocated memory on success, NULL otherwise.*@data is zero-cleared on success.* Caller holds tomoyo_policy_lock mutex.

函数原型:void *tomoyo_commit_ok(void *data, const unsigned int size)

返回类型:void

参数:

类型参数名称
void *data
const unsigned intsize
76  ptr等于分配内存并置零
78  如果moyo_memory_ok - Check memory quota.*@ptr: Pointer to allocated memory.* Returns true on success, false otherwise.* Returns true if @ptr is not NULL and quota not exceeded, false otherwise.* Caller holds tomoyo_policy_lock mutex.
79  memmove(ptr, data, size)
80  memset(data, 0, size)
81  返回:ptr
83  释放内存
84  返回:NULL
调用者
名称描述
tomoyo_update_domainmoyo_update_domain - Update an entry for domain policy.*@new_entry: Pointer to "struct tomoyo_acl_info".*@size: Size of @new_entry in bytes.*@param: Pointer to "struct tomoyo_acl_param".*@check_duplicate: Callback function to find duplicated entry.
tomoyo_assign_domainmoyo_assign_domain - Create a domain or a namespace.*@domainname: The name of domain.*@transit: True if transit to domain found or created.* Returns pointer to "struct tomoyo_domain_info" on success, NULL otherwise.* Caller holds tomoyo_read_lock().
tomoyo_get_groupmoyo_get_group - Allocate memory for "struct tomoyo_path_group"/"struct tomoyo_number_group".*@param: Pointer to "struct tomoyo_acl_param".*@idx: Index number.* Returns pointer to "struct tomoyo_group" on success, NULL otherwise.