Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_get_buffer

Proto:char *aa_get_buffer(bool in_atomic)

Type:char

Parameter:

TypeParameterName
boolin_atomic
1580  bool try_again = true
1581  flags = GFP_KERNEL | __GFP_RETRY_MAYFAIL | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.
1583  retry :
1584  spin_lock( & aa_buffers_lock)
1585  If buffer_count > reserve_count || in_atomic && Not list_empty - tests whether a list is empty*@head: the list to test. Then
1587  aa_buf = list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & aa_global_buffers, unionaa_buffer, list)
1589  deletes entry from list
1590  buffer_count--
1591  spin_unlock( & aa_buffers_lock)
1592  Return buffer[0]
1594  If in_atomic Then
1599  reserve_count++
1600  flags = DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear
1602  spin_unlock( & aa_buffers_lock)
1604  If Not in_atomic Then might_sleep()
1606  aa_buf = Allocation memory
1607  If Not aa_buf Then
1608  If try_again Then
1609  try_again = false
1610  Go to retry
1612  pr_warn_once("AppArmor: Failed to allocate a memory buffer.\n")
1613  Return NULL
1615  Return buffer[0]
Caller
NameDescribe
aa_path_permaa_path_perm - do permissions check & audit for @path*@op: operation being checked*@label: profile being enforced (NOT NULL)*@path: path to check permissions of (NOT NULL)*@flags: any additional path flags beyond what the profile specifies*@request:
aa_path_linkaa_path_link - Handle hard link permission check*@label: the label being enforced (NOT NULL)*@old_dentry: the target dentry (NOT NULL)*@new_dir: directory the new link will be created in (NOT NULL)*@new_dentry: the link being created (NOT NULL)
__file_path_perm
aa_remount
aa_bind_mount
aa_mount_change_type
aa_move_mount
aa_new_mount
aa_umount
aa_pivotroot