Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_try_to_gc - Try to kfree() an entry.*@type: One of values in "enum tomoyo_policy_id".*@element: Pointer to "struct list_head".* Returns nothing.* Caller holds tomoyo_policy_lock mutex.

Proto:static void tomoyo_try_to_gc(const enum tomoyo_policy_id type, struct list_head *element)

Type:void

Parameter:

TypeParameterName
const enum tomoyo_policy_idtype
struct list_head *element
395  deletes entry from list
396  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.
397  synchronize_srcu - wait for prior SRCU read-side critical-section completion*@ssp: srcu_struct with which to synchronize
405  If moyo_struct_used_by_io_buffer - Check whether the list element is used by /sys/kernel/security/tomoyo/ users or not.*@element: Pointer to "struct list_head".* Returns true if @element is used by /sys/kernel/security/tomoyo/ users,* false otherwise. Then Go to reinject
408  Case type == TOMOYO_ID_TRANSITION_CONTROL
409  moyo_del_transition_control - Delete members in "struct tomoyo_transition_control".*@element: Pointer to "struct list_head".* Returns nothing.
410  Break
411  Case type == TOMOYO_ID_MANAGER
412  moyo_del_manager - Delete members in "struct tomoyo_manager".*@element: Pointer to "struct list_head".* Returns nothing.
413  Break
414  Case type == TOMOYO_ID_AGGREGATOR
415  moyo_del_aggregator - Delete members in "struct tomoyo_aggregator".*@element: Pointer to "struct list_head".* Returns nothing.
416  Break
417  Case type == TOMOYO_ID_GROUP
418  moyo_del_group - Delete "struct tomoyo_group".*@element: Pointer to "struct list_head".* Returns nothing.
419  Break
420  Case type == TOMOYO_ID_PATH_GROUP
421  moyo_del_path_group - Delete members in "struct tomoyo_path_group".*@element: Pointer to "struct list_head".* Returns nothing.
422  Break
423  Case type == TOMOYO_ID_ADDRESS_GROUP
424  moyo_del_address_group - Delete members in "struct tomoyo_address_group".*@element: Pointer to "struct list_head".* Returns nothing.
425  Break
426  Case type == TOMOYO_ID_NUMBER_GROUP
427  moyo_del_number_group - Delete members in "struct tomoyo_number_group".*@element: Pointer to "struct list_head".* Returns nothing.
428  Break
429  Case type == TOMOYO_ID_CONDITION
430  moyo_del_condition - Delete members in "struct tomoyo_condition".*@element: Pointer to "struct list_head".* Returns nothing.
431  Break
432  Case type == TOMOYO_ID_NAME
437  If moyo_name_used_by_io_buffer - Check whether the string is used by /sys/kernel/security/tomoyo/ users or not.*@string: String to check.* Returns true if @string is used by /sys/kernel/security/tomoyo/ users,* false otherwise. Then Go to reinject
441  moyo_del_name - Delete members in "struct tomoyo_name".*@element: Pointer to "struct list_head".* Returns nothing.
442  Break
443  Case type == TOMOYO_ID_ACL
444  moyo_del_acl - Delete members in "struct tomoyo_acl_info".*@element: Pointer to "struct list_head".* Returns nothing.
445  Break
446  Case type == TOMOYO_ID_DOMAIN
451  If atomic_read( & 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.users) Then Go to reinject
455  Break
456  Case type == TOMOYO_MAX_POLICY
457  Break
459  mutex_lock( & tomoyo_policy_lock)
460  If type == TOMOYO_ID_DOMAIN Then moyo_del_domain - Delete members in "struct tomoyo_domain_info".*@element: Pointer to "struct list_head".* Returns nothing.* Caller holds tomoyo_policy_lock mutex.
462  moyo_memory_free - Free memory for elements.*@ptr: Pointer to allocated memory.* Returns nothing.* Caller holds tomoyo_policy_lock mutex.
463  Return
464  reinject :
473  mutex_lock( & tomoyo_policy_lock)
474  list_add_rcu - add a new entry to rcu-protected list*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head
Caller
NameDescribe
tomoyo_collect_membermoyo_collect_member - Delete elements with "struct tomoyo_acl_head".*@id: One of values in "enum tomoyo_policy_id".*@member_list: Pointer to "struct list_head".* Returns nothing.
tomoyo_collect_aclmoyo_collect_acl - Delete elements in "struct tomoyo_domain_info".*@list: Pointer to "struct list_head".* Returns nothing.
tomoyo_collect_entrymoyo_collect_entry - Try to kfree() deleted elements.* Returns nothing.