函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ns_ioctl

函数原型:static long ns_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)

返回类型:long

参数:

类型参数名称
struct file *filp
unsigned intioctl
unsigned longarg
193  ns等于get_proc_ns(file_inode(filp))
194  __userargp
198  :ioctl恒等于Returns a file descriptor that refers to an owning user namespace
199  返回:open_related_ns(ns, ns_get_owner)
200  :ioctl恒等于Returns a file descriptor that refers to a parent namespace
201  如果非get_parent则返回:负EINVAL
203  返回:open_related_ns(ns, get_parent)
204  :ioctl恒等于Returns the type of namespace (CLONE_NEW* value) referred to byfile descriptor
205  返回:type
206  :ioctl恒等于Get owner UID (in the caller's user namespace) for a user namespace
207  如果type不等于新用户空间则返回:负EINVAL
209  user_ns等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(ns, structuser_namespace, ns)
210  argp等于arg
211  uid等于m_kuid_munged - Create a uid from a kuid user-namespace pair.*@targ: The user namespace we want a uid in.*@kuid: The kernel internal uid to start with.* Map @kuid into the user-namespace specified by @targ and* return the resulting uid.
212  返回:put_user - Write a simple value into user space(uid, argp)
213  默认
214  返回:负ENOTTY