Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\apparmorfs.c Create Date:2022-07-28 19:50:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__aa_fs_create_rawdata

Proto:int __aa_fs_create_rawdata(struct aa_ns *ns, struct aa_loaddata *rawdata)

Type:int

Parameter:

TypeParameterName
struct aa_ns *ns
struct aa_loaddata *rawdata
1462  AA_BUG(!ns)
1463  AA_BUG(!rawdata)
1464  AA_BUG(!mutex_is_locked( & lock))
1465  AA_BUG(!ns_subdata_dir(ns))
1472  name = kasprintf(GFP_KERNEL, "%ld", revision)
1473  If Not name Then Return -ENOMEM
1476  dir = 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
1477  If IS_ERR(dir) Then Return PTR_ERR(dir)
1480  dents[AAFS_LOADDATA_DIR] = dir
1482  dent = aafs_create_file - create a file in the apparmorfs filesystem*@name: name of dentry to create*@mode: permissions the file should have*@parent: parent directory for this dentry*@data: data to store on inode
1484  If IS_ERR(dent) Then Go to fail
1486  dents[AAFS_LOADDATA_ABI] = dent
1488  dent = aafs_create_file - create a file in the apparmorfs filesystem*@name: name of dentry to create*@mode: permissions the file should have*@parent: parent directory for this dentry*@data: data to store on inode
1490  If IS_ERR(dent) Then Go to fail
1492  dents[AAFS_LOADDATA_REVISION] = dent
1494  If aa_g_hash_policy Then
1495  dent = aafs_create_file - create a file in the apparmorfs filesystem*@name: name of dentry to create*@mode: permissions the file should have*@parent: parent directory for this dentry*@data: data to store on inode
1497  If IS_ERR(dent) Then Go to fail
1499  dents[AAFS_LOADDATA_HASH] = dent
1502  dent = aafs_create_file - create a file in the apparmorfs filesystem*@name: name of dentry to create*@mode: permissions the file should have*@parent: parent directory for this dentry*@data: data to store on inode
1505  If IS_ERR(dent) Then Go to fail
1507  dents[AAFS_LOADDATA_COMPRESSED_SIZE] = dent
1509  dent = aafs_create_file - create a file in the apparmorfs filesystem*@name: name of dentry to create*@mode: permissions the file should have*@parent: parent directory for this dentry*@data: data to store on inode
1511  If IS_ERR(dent) Then Go to fail
1513  dents[AAFS_LOADDATA_DATA] = dent
1514  i_size = he original size of the payload
1516  ns = aa_get_ns - increment references count on @ns*@ns: namespace to increment reference count of (MAYBE NULL)* Returns: pointer to @ns, if @ns is NULL returns NULL* Requires: @ns must be held with valid refcount when called
1517  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
1520  Return 0
1522  fail :
1523  remove_rawdata_dents(rawdata)
1525  Return PTR_ERR(dent)
Caller
NameDescribe
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