函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_alloc_secid - allocate a new secid for a profile*@label: the label to allocate a secid for*@gfp: memory allocation flags* Returns: 0 with @label->secid initialized* <0 returns error with @label->secid set to AA_SECID_INVALID

函数原型:int aa_alloc_secid(struct aa_label *label, gfp_t gfp)

返回类型:int

参数:

类型参数名称
struct aa_label *label
gfp_tgfp
129  dr_preload - preload for idr_alloc()*@gfp_mask: allocation mask to use for preloading* Preallocate memory to use for the next call to idr_alloc(). This function* returns with preemption disabled. It will be enabled by idr_preload_end().
130  spin_lock_irqsave( & secid_lock, flags)
131  ret等于dr_alloc() - Allocate an ID.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@start: The minimum ID (inclusive).*@end: The maximum ID (exclusive).*@gfp: Memory allocation flags.
132  spin_unlock_irqrestore( & secid_lock, flags)
133  dr_preload_end - end preload section started with idr_preload()* Each idr_preload() should be matched with an invocation of this* function. See idr_preload() for details.
135  如果ret小于0则
136  secid等于secid value that will not be allocated
137  返回:ret
140  AA_BUG(ret == secid value that will not be allocated )
141  secid等于ret
142  返回:0
调用者
名称描述
aa_label_init