Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\memory.c Create Date:2022-07-28 19:43:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:void *tomoyo_commit_ok(void *data, const unsigned int size)

Type:void

Parameter:

TypeParameterName
void *data
const unsigned intsize
76  ptr = 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).
78  If 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. Then
79  memmove(ptr, data, size)
80  memset(data, 0, size)
81  Return ptr
83  kfree(ptr)
84  Return NULL
Caller
NameDescribe
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.