函数逻辑报告 |
Source Code:fs\namespace.c |
Create Date:2022-07-29 10:39:48 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:pivot_root Semantics:* Moves the root file system of the current process to the directory put_old,* makes new_root as the new root file system of the current process, and sets* root/cwd of all processes which had them on the current root to new_root
函数原型:SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, const char __user *, put_old)
返回类型:
参数:无
3618 | 如果非Is the caller allowed to modify his namespace?则返回:负EPERM |
3621 | error等于user_path_at(Special value used to indicateopenat should use the currentworking directory. , new_root, llow links at the end | quire a directory , & new) |
3626 | error等于user_path_at(Special value used to indicateopenat should use the currentworking directory. , put_old, llow links at the end | quire a directory , & old) |
3631 | error等于security_sb_pivotroot( & old, & new) |
3635 | get_fs_root(fs, & root) |
3636 | old_mp等于lock_mount( & old) |
3642 | new_mnt等于real_mount(mnt) |
3643 | root_mnt等于real_mount(mnt) |
3644 | old_mnt等于real_mount(mnt) |
3645 | ex_parent等于mnt_parent |
3646 | root_parent等于mnt_parent |
3647 | 如果IS_MNT_SHARED(old_mnt)或IS_MNT_SHARED(ex_parent)或IS_MNT_SHARED(root_parent)则转到:out4 |
3653 | 如果mnt_flags按位与MNT_LOCKED则转到:out4 |
3656 | 如果d_unlinked(dentry)则转到:out4 |
3664 | 如果非mnt_has_parent(root_mnt)则转到:out4 |
3668 | 如果非mnt_has_parent(new_mnt)则转到:out4 |
3676 | lock_mount_hash() |
3679 | 如果mnt_flags按位与MNT_LOCKED则 |
3680 | mnt_flags或等于MNT_LOCKED |
3681 | mnt_flags与等于MNT_LOCKED的反 |
3690 | 删除链表项并重新初始化 |
3692 | unlock_mount_hash() |
3693 | chroot_fs_refs( & root, & new) |
3694 | error等于0 |
3695 | out4 : |
3696 | unlock_mount(old_mp) |
3697 | 如果非error则mntput_no_expire(ex_parent) |
3699 | out3 : |
3701 | out2 : |
3703 | out1 : |
3705 | out0 : |
3706 | 返回:error |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |