函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\domain.c Create Date:2022-07-27 21:09:03
Last Modify:2022-05-23 20:14:46 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:struct tomoyo_policy_namespace *tomoyo_assign_namespace(const char *domainname)

返回类型:struct tomoyo_policy_namespace

参数:

类型参数名称
const char *domainname
466  cp等于domainname
467  len等于0
469 cpcp自加不等于' '循环
470  len自加
471  ptr等于moyo_find_namespace - Find specified namespace.*@name: Name of namespace to find.*@len: Length of @name.* Returns pointer to "struct tomoyo_policy_namespace" if found,* NULL otherwise.* Caller holds tomoyo_read_lock().
472  如果ptr则返回:ptr
474  如果len大于等于TOMOYO_EXEC_TMPSIZE减10或非tomoyo_domain_def(domainname)则返回:NULL
476  entry等于分配内存并置零
477  如果非entry则返回:NULL
479  如果mutex_lock_interruptible( & tomoyo_policy_lock)则转到:out
481  ptr等于moyo_find_namespace - Find specified namespace.*@name: Name of namespace to find.*@len: Length of @name.* Returns pointer to "struct tomoyo_policy_namespace" if found,* NULL otherwise.* Caller holds tomoyo_read_lock().
482  如果非ptrtomoyo_memory_ok(entry)则
483  name等于entry加1
485  ptr等于entry
486  memmove(name, domainname, len)
487  name[len]等于'\0'
488  Name of this namespace (e.g. "", "" ). 等于name
489  moyo_init_policy_namespace - Initialize namespace.*@ns: Pointer to "struct tomoyo_policy_namespace".* Returns nothing.
490  entry = NULL
492  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
493  out :
494  释放内存
495  返回:ptr
调用者
名称描述
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_parse_policymoyo_parse_policy - Parse a policy line.*@head: Poiter to "struct tomoyo_io_buffer".*@line: Line to parse.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().