函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\lsm.c Create Date:2022-07-27 21:40:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:aa_get_buffer

函数原型:char *aa_get_buffer(bool in_atomic)

返回类型:char

参数:

类型参数名称
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  加自旋锁
1585  如果buffer_count大于reserve_countin_atomic且非链表为空
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  删除链表项
1590  buffer_count自减
1591  自旋锁解锁
1592  返回:buffer[0]
1594  如果in_atomic
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  自旋锁解锁
1604  如果非in_atomicmight_sleep()
1606  aa_buf等于开辟内存
1607  如果非aa_buf
1608  如果try_again
1609  try_again = false
1610  转到:retry
1612  pr_warn_once("AppArmor: Failed to allocate a memory buffer.\n")
1613  返回:NULL
1615  返回:buffer[0]
调用者
名称描述
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