Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:int aa_alloc_secid(struct aa_label *label, gfp_t gfp)

Type:int

Parameter:

TypeParameterName
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  If ret < 0 Then
136  secid = secid value that will not be allocated
137  Return ret
140  AA_BUG(ret == secid value that will not be allocated )
141  secid = ret
142  Return 0
Caller
NameDescribe
aa_label_init