Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\common.c Create Date:2022-07-28 19:35:46
Last Modify:2020-03-18 09:15:18 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_print_entry - Print an ACL entry.*@head: Pointer to "struct tomoyo_io_buffer".*@acl: Pointer to an ACL entry.* Returns true on success, false otherwise.

Proto:static bool tomoyo_print_entry(struct tomoyo_io_buffer *head, struct tomoyo_acl_info *acl)

Type:bool

Parameter:

TypeParameterName
struct tomoyo_io_buffer *head
struct tomoyo_acl_info *acl
1395  acl_type = One of values in "enum tomoyo_acl_entry_type_index".
1396  bool first = true
1399  If print_cond_part Then Go to print_cond_part
1401  If true or false or TOMOYO_GC_IN_PROGRESS Then Return true
1403  If Not moyo_flush - Flush queued string to userspace's buffer.*@head: Pointer to "struct tomoyo_io_buffer".* Returns true if all data was flushed, false otherwise. Then Return false
1405  Else if acl_type == TOMOYO_TYPE_PATH_ACL Then
1406  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1408  perm = Bitmask of values in "enum tomoyo_path_acl_index".
1411  If Not (perm & 1 << bit ) Then Continue
1413  If print_transition_related_only && bit != TOMOYO_TYPE_EXECUTE Then Continue
1416  If first Then
1419  Else
1424  If first Then Return true
1426  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1427  Else if acl_type == TOMOYO_TYPE_MANUAL_TASK_ACL Then
1428  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1431  moyo_set_group - Print "acl_group " header keyword and category name.*@head: Pointer to "struct tomoyo_io_buffer".*@category: Category name.* Returns nothing.
1432  moyo_set_string - Queue string to "struct tomoyo_io_buffer" structure
1433  moyo_set_string - Queue string to "struct tomoyo_io_buffer" structure
1434  Else if print_transition_related_only Then
1435  Return true
1436  Else if acl_type == TOMOYO_TYPE_PATH2_ACL Then
1437  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1439  perm = Bitmask of values in "enum tomoyo_path2_acl_index".
1442  If Not (perm & 1 << bit ) Then Continue
1444  If first Then
1447  Else
1453  If first Then Return true
1455  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1456  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1457  Else if acl_type == TOMOYO_TYPE_PATH_NUMBER_ACL Then
1458  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1460  perm = Bitmask of values in "enum tomoyo_path_number_acl_index".
1463  If Not (perm & 1 << bit ) Then Continue
1465  If first Then
1468  Else
1474  If first Then Return true
1476  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1477  moyo_print_number_union - Print a tomoyo_number_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_number_union".* Returns nothing.
1478  Else if acl_type == TOMOYO_TYPE_MKDEV_ACL Then
1479  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1481  perm = Bitmask of values in "enum tomoyo_mkdev_acl_index".
1484  If Not (perm & 1 << bit ) Then Continue
1486  If first Then
1489  Else
1495  If first Then Return true
1497  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1498  moyo_print_number_union - Print a tomoyo_number_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_number_union".* Returns nothing.
1499  moyo_print_number_union - Print a tomoyo_number_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_number_union".* Returns nothing.
1500  moyo_print_number_union - Print a tomoyo_number_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_number_union".* Returns nothing.
1501  Else if acl_type == TOMOYO_TYPE_INET_ACL Then
1502  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1504  perm = Bitmask of values in "enum tomoyo_network_acl_index"
1507  If Not (perm & 1 << bit ) Then Continue
1509  If first Then
1515  Else
1520  If first Then Return true
1522  moyo_set_space - Put a space to "struct tomoyo_io_buffer" structure.*@head: Pointer to "struct tomoyo_io_buffer".* Returns nothing.
1527  Else
1530  tomoyo_print_ip(buf, size of buf , & address)
1533  moyo_print_number_union - Print a tomoyo_number_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_number_union".* Returns nothing.
1534  Else if acl_type == TOMOYO_TYPE_UNIX_ACL Then
1535  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1537  perm = Bitmask of values in "enum tomoyo_network_acl_index"
1540  If Not (perm & 1 << bit ) Then Continue
1542  If first Then
1548  Else
1553  If first Then Return true
1555  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1556  Else if acl_type == TOMOYO_TYPE_MOUNT_ACL Then
1557  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1560  moyo_set_group - Print "acl_group " header keyword and category name.*@head: Pointer to "struct tomoyo_io_buffer".*@category: Category name.* Returns nothing.
1561  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1562  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1563  moyo_print_name_union - Print a tomoyo_name_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_name_union".
1564  moyo_print_number_union - Print a tomoyo_number_union.*@head: Pointer to "struct tomoyo_io_buffer".*@ptr: Pointer to "struct tomoyo_number_union".* Returns nothing.
1565  Else if acl_type == TOMOYO_TYPE_ENV_ACL Then
1566  ptr = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(acl, typeof( * ptr), head)
1569  moyo_set_group - Print "acl_group " header keyword and category name.*@head: Pointer to "struct tomoyo_io_buffer".*@category: Category name.* Returns nothing.
1570  moyo_set_string - Queue string to "struct tomoyo_io_buffer" structure
1572  If Maybe NULL. Then
1573  print_cond_part = true
1574  cond_step = 0
1575  If Not moyo_flush - Flush queued string to userspace's buffer.*@head: Pointer to "struct tomoyo_io_buffer".* Returns true if all data was flushed, false otherwise. Then Return false
1577  print_cond_part :
1578  If Not moyo_print_condition - Print condition part.*@head: Pointer to "struct tomoyo_io_buffer".*@cond: Pointer to "struct tomoyo_condition".* Returns true on success, false otherwise. Then Return false
1580  print_cond_part = false
1581  Else
1582  moyo_set_lf - Put a line feed to "struct tomoyo_io_buffer" structure.*@head: Pointer to "struct tomoyo_io_buffer".* Returns nothing.
1584  Return true
Caller
NameDescribe
tomoyo_read_domain2moyo_read_domain2 - Read domain policy.*@head: Pointer to "struct tomoyo_io_buffer".*@list: Pointer to "struct list_head".* Caller holds tomoyo_read_lock().* Returns true on success, false otherwise.