函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_new_mount

函数原型:int aa_new_mount(struct aa_label *label, const char *dev_name, const struct path *path, const char *type, unsigned long flags, void *data)

返回类型:int

参数:

类型参数名称
struct aa_label *label
const char *dev_name
const struct path *path
const char *type
unsigned longflags
void *data
523  char * buffer = NULL, * dev_buffer = NULL
524  bool binary = true
526  requires_dev等于0
527  struct path tmp_path, * dev_path = NULL
529  AA_BUG(!label)
530  AA_BUG(!path)
532  如果type
535  fstype等于get_fs_type(type)
536  如果非fstype则返回:负ENODEV
538  binary等于fs_flags按位与FS_BINARY_MOUNTDATA
539  requires_dev等于fs_flags按位与FS_REQUIRES_DEV
540  put_filesystem(fstype)
542  如果requires_dev
543  如果非dev_name或非dev_name则返回:负ENOENT
547  如果error则返回:error
549  dev_path等于tmp_path
553  buffer等于aa_get_buffer(false)
554  如果非buffer
555  error等于负ENOMEM
556  转到:out
558  如果dev_path
559  dev_buffer等于aa_get_buffer(false)
560  如果非dev_buffer
561  error等于负ENOMEM
562  转到:out
564  error等于fn_for_each_confined(label, profile, match_mnt - handle path matching for mount*@profile: the confining profile*@mntpath: for the mntpnt (NOT NULL)*@buffer: buffer to be used to lookup mntpath*@devpath: path devname/src_name (MAYBE NULL)*@devbuffer: buffer to be used to lookup )
567  否则
568  error等于fn_for_each_confined(label, profile, match_mnt_path_str - handle path matching for mount*@profile: the confining profile*@mntpath: for the mntpnt (NOT NULL)*@buffer: buffer to be used to lookup mntpath*@devnme: string for the devname/src_name (MAY BE NULL OR ERRPTR)*@type: string for the dev )
573  out :
574  aa_put_buffer(buffer)
575  aa_put_buffer(dev_buffer)
576  如果dev_pathpath_put(dev_path)
579  返回:error