Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:map_id_up

Proto:static unsigned int map_id_up(struct uid_gid_map *map, unsigned int id)

Type:unsigned int

Parameter:

TypeParameterName
struct uid_gid_map *map
unsigned intid
356  extents = 64 bytes -- 1 cache line
357  smp_rmb()
359  If extents <= UID_GID_MAP_MAX_BASE_EXTENTS Then extent = map_id_up_base - Find idmap via binary search in static extent array.* Can only be called if number of mappings is equal or less than* UID_GID_MAP_MAX_BASE_EXTENTS.
361  Else extent = map_id_up_max - Find idmap via binary search in ordered idmap array.* Can only be called if number of mappings exceeds UID_GID_MAP_MAX_BASE_EXTENTS.
365  If extent Then id = id - lower_first + first
367  Else id = (u32) - 1
370  Return id
Caller
NameDescribe
from_kuidm_kuid - 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.
from_kgidm_kgid - Create a gid from a kgid user-namespace pair.*@targ: The user namespace we want a gid in.*@kgid: The kernel internal gid to start with.* Map @kgid into the user-namespace specified by @targ and* return the resulting gid.
from_kprojidm_kprojid - Create a projid from a kprojid user-namespace pair.*@targ: The user namespace we want a projid in.*@kprojid: The kernel internal project identifier to start with.* Map @kprojid into the user-namespace specified by @targ and