函数逻辑报告 |
Source Code:kernel\fork.c |
Create Date:2022-07-27 09:58:31 |
| Last Modify:2020-03-17 11:04:53 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:share allows a process to 'unshare' part of the process* context which was originally shared using clone. copy_** functions used by do_fork() cannot be used here directly* because they modify an inactive task_struct that is being* constructed
函数原型:int ksys_unshare(unsigned long unshare_flags)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| unsigned long | unshare_flags |
| 2898 | struct files_struct * fd, * new_fd = NULL |
| 2900 | struct nsproxy * new_nsproxy = NULL |
| 2901 | do_sysvsem等于0 |
| 2908 | 如果unshare_flags按位与新用户空间则unshare_flags或等于属于同一个线程组按位或共享文件系统 |
| 2913 | 如果unshare_flags按位与共享虚拟内存则unshare_flags或等于共享信号处理 |
| 2918 | 如果unshare_flags按位与共享信号处理则unshare_flags或等于属于同一个线程组 |
| 2923 | 如果unshare_flags按位与在新的namespace启动子进程则unshare_flags或等于共享文件系统 |
| 2927 | 如果err则转到:bad_unshare_out |
| 2934 | 如果unshare_flags按位与新消息空间按位或share system V SEM_UNDO semantics 的值则do_sysvsem等于1 |
| 2937 | 如果err则转到:bad_unshare_out |
| 2940 | 如果err则转到:bad_unshare_cleanup_fs |
| 2942 | err等于unshare_userns(unshare_flags, & new_cred) |
| 2943 | 如果err则转到:bad_unshare_cleanup_fd |
| 2945 | err等于unshare_nsproxy_namespaces(unshare_flags, & new_nsproxy, new_cred, new_fs) |
| 2947 | 如果err则转到:bad_unshare_cleanup_cred |
| 2950 | 如果new_fs或new_fd或do_sysvsem或new_cred或new_nsproxy则 |
| 2951 | 如果do_sysvsem则 |
| 2957 | 如果unshare_flags按位与新消息空间则 |
| 2960 | shm_init_task(当前进程) |
| 2963 | 如果new_nsproxy则switch_task_namespaces(当前进程, new_nsproxy) |
| 2968 | 如果new_fs则 |
| 2979 | 如果new_fd则 |
| 2985 | task_unlock(当前进程) |
| 2987 | 如果new_cred则 |
| 2994 | perf_event_namespaces(当前进程) |
| 2996 | bad_unshare_cleanup_cred : |
| 2997 | 如果new_cred则put_cred - Release a reference to a set of credentials*@cred: The credentials to release* Release a reference to a set of credentials, deleting them when the last ref* is released |
| 2999 | bad_unshare_cleanup_fd : |
| 3000 | 如果new_fd则put_files_struct(new_fd) |
| 3003 | bad_unshare_cleanup_fs : |
| 3004 | 如果new_fs则free_fs_struct(new_fs) |
| 3007 | bad_unshare_out : |
| 3008 | 返回:err |
| 名称 | 描述 |
|---|---|
| SYSCALL_DEFINE1 | |
| init_linuxrc |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |