Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\nsfs.c Create Date:2022-07-28 20:12:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ns_ioctl

Proto:static long ns_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)

Type:long

Parameter:

TypeParameterName
struct file *filp
unsigned intioctl
unsigned longarg
193  ns = get_proc_ns(file_inode(filp))
194  __user * argp
198  Case ioctl == Returns a file descriptor that refers to an owning user namespace
199  Return open_related_ns(ns, ns_get_owner)
200  Case ioctl == Returns a file descriptor that refers to a parent namespace
201  If Not get_parent Then Return -EINVAL
203  Return open_related_ns(ns, get_parent)
204  Case ioctl == Returns the type of namespace (CLONE_NEW* value) referred to byfile descriptor
205  Return type
206  Case ioctl == Get owner UID (in the caller's user namespace) for a user namespace
207  If type != New user namespace Then Return -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  Return Write a simple value into user space(uid, argp)
213  Default
214  Return -ENOTTY