函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__label_replace - replace @old with @new in label set*@old: label to remove from label set*@new: label to replace @old with* Requires: labels_set(@old)->lock write_lock* valid ref count be held on @new* Returns: true if @old was in set and replaced by

函数原型:static bool __label_replace(struct aa_label *old, struct aa_label *new)

返回类型:bool

参数:

类型参数名称
struct aa_label *old
struct aa_label *new
601  ls等于labels_set(old)
603  AA_BUG(!ls)
604  AA_BUG(!old)
605  AA_BUG(!new)
606  lockdep_assert_held_write( & lock)
607  AA_BUG(flags & label is in tree )
609  如果非label_is_stale(old)则__label_make_stale(old)
612  如果flags按位与 label is in tree
613  rb_replace_node( & node, & node, & root)
614  flags与等于 label is in tree 的反
615  flags或等于 label is in tree
616  返回:true
619  返回:false
调用者
名称描述
__label_insert__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
aa_label_replaceaa_label_replace - replace a label @old with a new version @new*@old: label to replace*@new: label replacing @old* Returns: true if @old was in tree and replaced* else @old was not in tree, and @new was not inserted