Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:bool tomoyo_memory_ok(void *ptr)

Type:bool

Parameter:

TypeParameterName
void *ptr
49  If ptr Then
50  s = ksize - get the actual amount of memory allocated for a given object*@objp: Pointer to the object* kmalloc may internally round up allocations and return more memory* than requested. ksize() can be used to determine the actual amount of* memory allocated
52  Memoy currently used by policy/audit log/query. [TOMOYO_MEMORY_POLICY] += s
53  If Not Memory quota for "policy"/"audit log"/"query". [TOMOYO_MEMORY_POLICY] || Memoy currently used by policy/audit log/query. [TOMOYO_MEMORY_POLICY] <= Memory quota for "policy"/"audit log"/"query". [TOMOYO_MEMORY_POLICY] Then Return true
57  Memoy currently used by policy/audit log/query. [TOMOYO_MEMORY_POLICY] -= s
59  moyo_warn_oom - Print out of memory warning message.*@function: Function's name.
60  Return false
Caller
NameDescribe
tomoyo_commit_conditionmoyo_commit_condition - Commit "struct tomoyo_condition".*@entry: Pointer to "struct tomoyo_condition".* Returns pointer to "struct tomoyo_condition" on success, NULL otherwise.* This function merges duplicated entries. This function returns NULL if
tomoyo_assign_namespacemoyo_assign_namespace - Create a new namespace.*@domainname: Name of namespace to create.* Returns pointer to "struct tomoyo_policy_namespace" on success,* NULL otherwise.* Caller holds tomoyo_read_lock().
tomoyo_commit_okmoyo_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.
tomoyo_get_namemoyo_get_name - Allocate permanent memory for string data.*@name: The string to store into the permernent memory.* Returns pointer to "struct tomoyo_path_info" on success, NULL otherwise.