函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static struct aa_label *__label_update(struct aa_label *label)

返回类型:struct aa_label

参数:

类型参数名称
struct aa_label *label
2026  invcount等于0
2028  AA_BUG(!label)
2029  AA_BUG(!是互斥锁)
2031  new等于aa_label_alloc - allocate a label with a profile vector of @size length*@size: size of profile vector in the label*@proxy: proxy to use OR null if to allocate a new one*@gfp: memory allocation type* Returns: new label* else NULL if failed
2032  如果非new则返回:NULL
2039  ls等于labels_set(label)
2040  write_lock_irqsave( & lock, flags)
2041 i小于size循环
2042  AA_BUG(!vec[i])
2043  vec[i]等于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
2044  AA_BUG(!vec[i])
2045  AA_BUG(!proxy)
2046  AA_BUG(!label)
2047  如果proxy不等于proxyinvcount自加
2052  如果invcount
2053  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
2056  如果size恒等于1则
2057  tmp等于aa_get_label( & label)
2058  AA_BUG(tmp == label)
2059  转到:remove
2061  如果labels_set(label)不等于labels_set(new)则
2065  转到:remove
2067  否则AA_BUG(labels_ns(label) != labels_ns(new))
2070  tmp等于__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
2071  remove :
2073  __label_remove - remove @label from the label set*@l: label to remove*@new: label to redirect to* Requires: labels_set(@label)->lock write_lock* Returns: true if the label was in the tree and removed
2074  write_unlock_irqrestore( & lock, flags)
2075  label_free_or_put_new(tmp, new)
2077  返回:tmp
调用者
名称描述
__labelset_update__labelset_update - update labels in @ns*@ns: namespace to update labels in (NOT NULL)* Requires: @ns lock be held* Walk the labelset ensuring that all labels are up to date and valid* Any label that has a stale component is marked stale and replaced and