函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_write_domain - Write domain policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().

函数原型:static int tomoyo_write_domain(struct tomoyo_io_buffer *head)

返回类型:int

参数:

类型参数名称
struct tomoyo_io_buffer *head
1174  data等于Buffer for writing.
1176  domain等于 The position currently writing to.
1177  is_delete等于is_delete
1178  is_select等于非is_deletetomoyo_str_starts( & data, "select ")
1181  如果data恒等于'<'则
1182  ret等于0
1184  domain = NULL
1185  如果is_deleteret等于moyo_delete_domain - Delete a domain.*@domainname: The name of domain.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
1187  否则如果is_selectdomain等于moyo_find_domain - Find a domain by the given name.*@domainname: The domainname to find.* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.* Caller holds tomoyo_read_lock().
1189  否则domain等于moyo_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().
1191  The position currently writing to. 等于domain
1192  返回:ret
1194  如果非domain则返回:负EINVAL
1196  ns等于 Namespace for this domain. Never NULL.
1197  如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments恒等于1且idx小于Profile number is an integer between 0 and 255.
1199  如果非External variable definitions. ********* Profile table. Memory is allocated as needed. [idx]则如果非is_delete
1201  Profile number to use. 等于idx
1202  返回:0
1204  如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments恒等于1且idx小于Group number is an integer between 0 and 255.
1206  如果非is_delete设置内存位
1208  否则lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
1210  返回:0
1212 idx小于TOMOYO_MAX_DOMAIN_INFO_FLAGS循环
1213  cp等于String table for domain flags. [idx]
1215  如果字符串指定长度比较则继续下一循环
1217  flags[idx]等于非is_delete
1218  返回:0
1220  返回:moyo_write_domain2 - Write domain policy.*@ns: Pointer to "struct tomoyo_policy_namespace".*@list: Pointer to "struct list_head".*@data: Policy to be interpreted.*@is_delete: True if it is a delete request.* Returns 0 on success, negative value otherwise.