函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Requires: @profile->ns->lock held

函数原型:int __aafs_profile_mkdir(struct aa_profile *profile, struct dentry *parent)

返回类型:int

参数:

类型参数名称
struct aa_profile *profile
struct dentry *parent
1701  dent等于NULL
1704  AA_BUG(!profile)
1705  AA_BUG(!是互斥锁)
1707  如果非parent
1709  p等于aa_deref_parent(profile)
1710  dent等于prof_dir(p)
1712  dent等于aafs_create_dir - create a directory in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry* see aafs_create
1713  如果是错误则转到:fail
1715  prof_child_dir(p)等于parent等于dent
1718  如果非dirname
1720  len等于aa_mangle_name - mangle a profile name to std profile layout form*@name: profile name to mangle (NOT NULL)*@target: buffer to store mangled name, same length as @name (MAYBE NULL)* Returns: length of mangled name
1721  id_len等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1723  dirname等于开辟内存
1724  如果非dirname
1725  error等于负ENOMEM
1726  转到:fail2
1729  aa_mangle_name - mangle a profile name to std profile layout form*@name: profile name to mangle (NOT NULL)*@target: buffer to store mangled name, same length as @name (MAYBE NULL)* Returns: length of mangled name
1730  输出格式化串
1733  dent等于aafs_create_dir - create a directory in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry* see aafs_create
1734  如果是错误则转到:fail
1736  prof_dir(profile)等于dir等于dent
1738  dent等于create_profile_file(dir, "name", profile, & seq_profile_name_fops)
1740  如果是错误则转到:fail
1742  dents[AAFS_PROF_NAME]等于dent
1744  dent等于create_profile_file(dir, "mode", profile, & seq_profile_mode_fops)
1746  如果是错误则转到:fail
1748  dents[AAFS_PROF_MODE]等于dent
1750  dent等于create_profile_file(dir, "attach", profile, & seq_profile_attach_fops)
1752  如果是错误则转到:fail
1754  dents[AAFS_PROF_ATTACH]等于dent
1756  如果hash
1757  dent等于create_profile_file(dir, "sha1", profile, & seq_profile_hash_fops)
1759  如果是错误则转到:fail
1761  dents[AAFS_PROF_HASH]等于dent
1764  如果rawdata
1765  dent等于aafs_create_symlink - create a symlink in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry*@target: if symlink, symlink target string*@private: private data*@iops: struct of inode_operations that should
1768  如果是错误则转到:fail
1770  aa_get_proxy(proxy)
1771  dents[AAFS_PROF_RAW_HASH]等于dent
1773  dent等于aafs_create_symlink - create a symlink in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry*@target: if symlink, symlink target string*@private: private data*@iops: struct of inode_operations that should
1776  如果是错误则转到:fail
1778  aa_get_proxy(proxy)
1779  dents[AAFS_PROF_RAW_ABI]等于dent
1781  dent等于aafs_create_symlink - create a symlink in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry*@target: if symlink, symlink target string*@private: private data*@iops: struct of inode_operations that should
1784  如果是错误则转到:fail
1786  aa_get_proxy(proxy)
1787  dents[AAFS_PROF_RAW_DATA]等于dent
1791  error等于Requires: @profile->ns->lock held
1792  如果error则转到:fail2
1796  返回:0
1798  fail :
1799  error等于错误
1801  fail2 :
1802  Requires: @profile->ns->lock held
1804  返回:error
调用者
名称描述
__aafs_profile_mkdirRequires: @profile->ns->lock held
__aafs_ns_mkdirRequires: @ns->lock held
aa_replace_profilesaa_replace_profiles - replace profile(s) on the profile list*@policy_ns: namespace load is occurring on*@label: label that is attempting to load/replace policy*@mask: permission mask*@udata: serialized data stream (NOT NULL)* unpack and replace a profile