函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static struct aa_label *label_merge_insert(struct aa_label *new, struct aa_label *a, struct aa_label *b)

返回类型:struct aa_label

参数:

类型参数名称
struct aa_label *new
struct aa_label *a
struct aa_label *b
1028  k等于0, invcount等于0
1029  bool stale = false
1031  AA_BUG(!a)
1032  AA_BUG(size < 0)
1033  AA_BUG(!b)
1034  AA_BUG(size < 0)
1035  AA_BUG(!new)
1036  AA_BUG(size < size + size)
1039  AA_BUG(!next)
1040  如果profile_is_stale(next)则
1041  vec[k]等于aa_get_newest_profile - simple wrapper fn to wrap the label version*@p: profile (NOT NULL)* Returns refcount to newest version of the profile (maybe @p)* Requires: @p must be held with a valid refcount
1042  AA_BUG(!proxy)
1043  AA_BUG(!label)
1044  如果proxy不等于proxyinvcount自加
1046  k自加
1047  stale = true
1048  否则vec[k++]等于aa_get_profile - increment refcount on profile @p*@p: profile (MAYBE NULL)* Returns: pointer to @p if @p is NULL will return NULL* Requires: @p must be held with valid refcount when called
1052  size等于k
1053  vec[k] = NULL
1055  如果invcount
1056  size减等于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
1059  如果size恒等于1则
1060  label等于aa_get_label( & label)
1061  返回:label
1063  否则如果非stale
1068  如果k恒等于size则返回:aa_get_label(a)
1070  否则如果k恒等于size则返回:aa_get_label(b)
1073  如果vec_unconfined(vec, size)则flags或等于 label unconfined only if all
1075  ls等于labels_set(new)
1076  write_lock_irqsave( & lock, flags)
1077  label等于__label_insert - attempt to insert @l into a label set*@ls: set of labels to insert @l into (NOT NULL)*@label: new label to insert (NOT NULL)*@replace: whether insertion should replace existing entry that is not stale* Requires: @ls->lock* caller to hold
1078  write_unlock_irqrestore( & lock, flags)
1080  返回:label
调用者
名称描述
aa_label_mergeaa_label_merge - attempt to insert new merged label of @a and @b*@ls: set of labels to insert label into (NOT NULL)*@a: label to merge with @b (NOT NULL)*@b: label to merge with @a (NOT NULL)*@gfp: memory allocation type* Requires: caller to hold valid