Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ll a group_info from a user-space array - it must be allocated already

Proto:static int groups_from_user(struct group_info *group_info, gid_t __user *grouplist)

Type:int

Parameter:

TypeParameterName
struct group_info *group_info
gid_t __user *grouplist
62  user_ns = current_user_ns()
64  count = ngroups
66  When i < count cycle
69  If Get a simple variable from user space(gid, grouplist + i) Then Return -EFAULT
72  kgid = make_kgid(user_ns, gid)
73  If Not gid_valid(kgid) Then Return -EINVAL
76  gid[i] = kgid
78  Return 0
Caller
NameDescribe
SYSCALL_DEFINE2SMP: Our groups are copy-on-write. We can set them safely* without another task interfering.