函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int aa_vec_unique(struct aa_profile **vec, int n, int flags)

返回类型:int

参数:

类型参数名称
struct aa_profile **vec
intn
intflags
264  dups等于0
266  AA_BUG(n < 1)
267  AA_BUG(!vec)
270  如果n大于8则
271  sort(vec, n, *的长度, 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  转到:out
277 i小于n循环
278  tmp等于vec[i]
281 pos大于等于0循环
284  如果res恒等于0则
289  否则如果res小于0则退出
293  pos自加
295 j大于pos循环vec[j]等于vec[j - 1]
297  vec[pos]等于tmp
298  continue_outer :
302  AA_BUG(dups < 0)
304  out :
305  如果flags按位与VEC_FLAG_TERMINATEvec[n - dups] = NULL
308  返回:dups
调用者
名称描述
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