函数逻辑报告 | 
Source Code:fs\namespace.c | 
Create Date:2022-07-29 10:39:47 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Create a kernel mount representation for a new, prepared superblock* (specified by fs_fd) and attach to an open_tree-like file descriptor.
函数原型:SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags, unsigned int, attr_flags)
返回类型:
参数:无
| 3375 | mnt_flags等于0 | 
| 3378 | 如果非Is the caller allowed to modify his namespace?则返回:负EPERM | 
| 3381 | 如果flags按位与smount() flags.的反的值不等于0则返回:负EINVAL | 
| 3394 | 如果attr_flags按位与Ignore suid and sgid bits 则mnt_flags或等于MNT_NOSUID | 
| 3398 | 如果attr_flags按位与Disallow program execution 则mnt_flags或等于MNT_NOEXEC | 
| 3404 | 当: & == - Always perform atime updates | 
| 3405 | 退出 | 
| 3406 | 当: & == - Do not update access times. | 
| 3407 | mnt_flags或等于MNT_NOATIME | 
| 3408 | 退出 | 
| 3409 | 当: & == - Update atime relative to mtime/ctime. | 
| 3410 | mnt_flags或等于MNT_RELATIME | 
| 3411 | 退出 | 
| 3412 | 默认 | 
| 3413 | 返回:负EINVAL | 
| 3421 | 如果f_op不等于fscontext_fops则转到:err_fsfd | 
| 3426 | ret等于mutex_lock_interruptible( & uapi_mutex) | 
| 3432 | 如果非root则转到:err_unlock | 
| 3436 | 如果mount_too_revealing(d_sb, & mnt_flags)则 | 
| 3437 | 打印警告信息("VFS: Mount too revealing\n") | 
| 3438 | 转到:err_unlock | 
| 3442 | 如果phase不等于FS_CONTEXT_AWAITING_MOUNT则转到:err_unlock | 
| 3446 | 如果sb_flags按位与Allow mandatory locks on an FS 且非may_mandlock()则转到:err_unlock | 
| 3450 | 如果是错误则 | 
| 3452 | 转到:err_unlock | 
| 3462 | vfs_clean_context(fc) | 
| 3464 | ns等于alloc_mnt_ns(user_ns, true) | 
| 3465 | 如果是错误则 | 
| 3469 | mnt等于real_mount(mnt) | 
| 3470 | containing namespace 等于ns | 
| 3472 | # of mounts in the namespace 等于1 | 
| 3473 | 添加链表项 | 
| 3479 | file等于dentry_open( & newmount, O_PATH, cred) | 
| 3480 | 如果是错误则 | 
| 3487 | ret等于get_unused_fd_flags((flags & smount() flags.) ? O_CLOEXEC : 0) | 
| 3488 | 如果ret大于等于0则fd_install(ret, file) | 
| 3493 | err_path : | 
| 3495 | err_unlock : | 
| 3497 | err_fsfd : | 
| 3499 | 返回:ret | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |