Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_vec_unique - canonical sort and unique a list of profiles*@n: number of refcounted profiles in the list (@n > 0)*@vec: list of profiles to sort and merge* Returns: the number of duplicates eliminated == references put* If @flags & VEC_FLAG_TERMINATE

Proto:int aa_vec_unique(struct aa_profile **vec, int n, int flags)

Type:int

Parameter:

TypeParameterName
struct aa_profile **vec
intn
intflags
264  dups = 0
266  AA_BUG(n < 1)
267  AA_BUG(!vec)
270  If n > 8 Then
271  sort(vec, n, size of * , sort_cmp, NULL)
272  dups = assumes vec is sorted* Assumes @vec has null terminator at vec[n], and will null terminate* vec[n - dups]
273  Go to out
277  When i < n cycle
278  tmp = vec[i]
281  When pos >= 0 cycle
284  If res == 0 Then
289  Else if res < 0 Then Break
293  pos++
295  When j > pos cycle vec[j] = vec[j - 1]
297  vec[pos] = tmp
298  continue_outer :
302  AA_BUG(dups < 0)
304  out :
305  If flags & VEC_FLAG_TERMINATE Then vec[n - dups] = NULL
308  Return dups
Caller
NameDescribe
label_merge_insertlabel_merge_insert - create a new label by merging @a and @b*@new: preallocated label to merge into (NOT NULL)*@a: label to merge with @b (NOT NULL)*@b: label to merge with @a (NOT NULL)* Requires: preallocated proxy* Returns: ref counted label either
aa_label_strn_parseaa_label_strn_parse - parse, validate and convert a text string to a label*@base: base label to use for lookups (NOT NULL)*@str: null terminated text string (NOT NULL)*@n: length of str to parse, will stop at \0 if encountered before n*@gfp: allocation
__label_update__label_update - insert updated version of @label into labelset*@label - the label to update/replace* Returns: new label that is up to date* else NULL on failure* Requires: @ns lock be held* Note: worst case is the stale @label does not get updated and has