函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:bool tomoyo_memory_ok(void *ptr)

返回类型:bool

参数:

类型参数名称
void *ptr
49  如果ptr
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  如果非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]则返回: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  返回:false
调用者
名称描述
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.