函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__lookupn_profile - lookup the profile matching @hname*@base: base list to start looking up profile name from (NOT NULL)*@hname: hierarchical profile name (NOT NULL)*@n: length of @hname* Requires: rcu_read_lock be held* Returns: unrefcounted profile

函数原型:static struct aa_profile *__lookupn_profile(struct aa_policy *base, const char *hname, size_t n)

返回类型:struct aa_profile

参数:

类型参数名称
struct aa_policy *base
const char *hname
size_tn
398  struct aa_profile * profile = NULL
401 split循环
403  profile等于__strn_find_child - find a profile on @head list using substring of @name*@head: list to search (NOT NULL)*@name: name of profile (NOT NULL)*@len: length of @name substring to match* Requires: rcu_read_lock be held* Returns: unrefcounted profile ptr, or
405  如果非profile则返回:NULL
408  base等于base
409  n减等于split加2减hname
410  hname等于split加2
413  如果n则返回:__strn_find_child - find a profile on @head list using substring of @name*@head: list to search (NOT NULL)*@name: name of profile (NOT NULL)*@len: length of @name substring to match* Requires: rcu_read_lock be held* Returns: unrefcounted profile ptr, or
415  返回:NULL
调用者
名称描述
__lookup_profile
aa_lookupn_profileaa_lookup_profile - find a profile by its full or partial name*@ns: the namespace to start from (NOT NULL)*@hname: name to do lookup on. Does not contain namespace prefix (NOT NULL)*@n: size of @hname* Returns: refcounted profile or NULL if not found