函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Called from unshare. Unshare all the namespaces part of nsproxy.* On success, returns the new nsproxy.

函数原型:int unshare_nsproxy_namespaces(unsigned long unshare_flags, struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs)

返回类型:int

参数:

类型参数名称
unsigned longunshare_flags
struct nsproxy **new_nsp
struct cred *new_cred
struct fs_struct *new_fs
192  err等于0
194  如果非unshare_flags按位与在新的namespace启动子进程按位或新主机空间按位或新消息空间按位或新网络空间按位或新进程空间按位或New cgroup namespace 的值的值则返回:0
198  user_ns等于如果new_cred user_ns the caps and keyrings are relative to. 否则current_user_ns()
199  如果非ns_capable(user_ns, Allow setting zone reclaim policy )则返回:负EPERM
202  new_nsp等于Create new nsproxy and all of its the associated namespaces.* Return the newly created nsproxy. Do not attach this to the task,* leave it to the caller to do proper locking and attach it to task.
204  如果是错误
205  err等于错误
206  转到:out
209  out :
210  返回:err
调用者
名称描述
ksys_unshareshare 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