函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\audit_tree.c Create Date:2022-07-27 12:34:11
Last Modify:2022-05-22 16:43:11 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:alled with audit_filter_mutex

函数原型:int audit_add_tree_rule(struct audit_krule *rule)

返回类型:int

参数:

类型参数名称
struct audit_krule *rule
806  seed等于 associated watched tree
811  associated watched tree = NULL
813  如果非字符串比较
814  put_tree(seed)
815  associated watched tree 等于tree
816  添加链表项
817  返回:0
820  tree等于seed
821  添加链表项
822  添加链表项
824  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
826  如果此条件成立可能性小(为编译器优化)(!prune_thread)则
827  err等于audit_launch_prune()
828  如果err则转到:Err
832  err等于kern_path(pathname, 0, & path)
833  如果err则转到:Err
835  mnt等于collect_mounts( & path)
836  path_put( & path)
837  如果是错误
838  err等于错误
839  转到:Err
842  get_tree(tree)
843  err等于iterate_mounts(tag_mount, tree, mnt)
844  drop_collected_mounts(mnt)
846  如果非err
848  加自旋锁
849  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(node, & chunks, list)
850  index; upper bit indicates 'will prune' 与等于1U左移31位的值的反
851  自旋锁解锁
852  否则
853  rim the uncommitted chunks from tree
854  转到:Err
857  mutex_lock( & audit_filter_mutex)
858  如果链表为空
859  put_tree(tree)
860  返回:负ENOENT
862  associated watched tree 等于tree
863  put_tree(tree)
865  返回:0
866  Err :
867  mutex_lock( & audit_filter_mutex)
868  删除链表项并重新初始化
869  删除链表项并重新初始化
870  put_tree(tree)
871  返回:err
调用者
名称描述
audit_add_ruleAdd rule to given filterlist if not a duplicate.