函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_set_mnt_opts - set Smack specific mount options*@sb: the file system superblock*@mnt_opts: Smack mount options*@kern_flags: mount option from kernel space or user space*@set_kern_flags: where to store converted mount opts* Returns 0 on success, an

函数原型:static int smack_set_mnt_opts(struct super_block *sb, void *mnt_opts, unsigned long kern_flags, unsigned long *set_kern_flags)

返回类型:int

参数:

类型参数名称
struct super_block *sb
void *mnt_opts
unsigned longkern_flags
unsigned long *set_kern_flags
781  root等于s_root
782  inode等于d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
783  sp等于s_security
786  opts等于mnt_opts
787  bool transmute = false
789  如果smk_flags按位与Superblock flags则返回:0
792  如果(i_security == NULL)则
793  rc等于lsm_inode_alloc - allocate a composite inode blob*@inode: the inode that needs a blob* Allocate the inode blob for all the modules* Returns 0, or -ENOMEM if memory can't be allocated.
795  如果rc则返回:rc
799  如果非smack_privileged(Allow MAC configuration or state changes)则
803  如果opts则返回:负EPERM
808  skp等于Present a pointer to the smack label in the current task blob.
809  smk_root等于skp
810  smk_default等于skp
819  transmute = true
820  smk_flags或等于SMK_SB_UNTRUSTED
824  smk_flags或等于Superblock flags
826  如果opts
827  如果fsdefault
828  skp等于smk_import_entry(fsdefault, 0)
829  如果是错误则返回:错误
831  smk_default等于skp
833  如果fsfloor
834  skp等于smk_import_entry(fsfloor, 0)
835  如果是错误则返回:错误
837  smk_floor等于skp
839  如果fshat
840  skp等于smk_import_entry(fshat, 0)
841  如果是错误则返回:错误
843  smk_hat等于skp
845  如果fsroot
846  skp等于smk_import_entry(fsroot, 0)
847  如果是错误则返回:错误
849  smk_root等于skp
851  如果fstransmute
853  如果是错误则返回:错误
855  smk_root等于skp
856  transmute = true
863  _inode_smack - initialize an inode security blob*@inode: inode to extract the info from*@skp: a pointer to the Smack label entry to use in the blob
865  如果transmute
866  isp等于smack_inode(inode)
867  smack inode flags 或等于directory is transmuting
870  返回:0