Function report |
Source Code:kernel\user_namespace.c |
Create Date:2022-07-28 11:19:31 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:map_write
Proto:static ssize_t map_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| const char __user * | buf | |
| size_t | count | |
| loff_t * | ppos | |
| int | cap_setid | |
| struct uid_gid_map * | map | |
| struct uid_gid_map * | parent_map |
| 863 | kbuf = memdup_user_nul(buf, count) |
| 886 | mutex_lock( & userns_state_mutex) |
| 888 | memset( & new_map, 0, sizeof(structuid_gid_map)) |
| 892 | If 64 bytes -- 1 cache line != 0 Then Go to out |
| 907 | next_line = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 908 | If next_line Then |
| 915 | pos = skip_spaces - Removes leading whitespace from @str.*@str: The string to be stripped.* Returns a pointer to the first non-whitespace character in @str. |
| 917 | If Not Note: isspace() must return false for %NUL-terminator ( * pos) Then Go to out |
| 920 | pos = skip_spaces - Removes leading whitespace from @str.*@str: The string to be stripped.* Returns a pointer to the first non-whitespace character in @str. |
| 922 | If Not Note: isspace() must return false for %NUL-terminator ( * pos) Then Go to out |
| 925 | pos = skip_spaces - Removes leading whitespace from @str.*@str: The string to be stripped.* Returns a pointer to the first non-whitespace character in @str. |
| 927 | If pos && Not Note: isspace() must return false for %NUL-terminator ( * pos) Then Go to out |
| 931 | pos = skip_spaces - Removes leading whitespace from @str.*@str: The string to be stripped.* Returns a pointer to the first non-whitespace character in @str. |
| 936 | If ((first == (u32) - 1) || (lower_first == (u32) - 1)) Then Go to out |
| 945 | If lower_first + count <= lower_first Then Go to out |
| 950 | If mappings_overlap( & new_map, & extent) Then Go to out |
| 953 | If (( 64 bytes -- 1 cache line + 1) == UID_GID_MAP_MAX_EXTENTS && (next_line != NULL)) Then Go to out |
| 963 | If 64 bytes -- 1 cache line == 0 Then Go to out |
| 975 | When idx < 64 bytes -- 1 cache line cycle |
| 979 | If 64 bytes -- 1 cache line <= UID_GID_MAP_MAX_BASE_EXTENTS Then e = extent[idx] |
| 991 | If (lower_first == (u32) - 1) Then Go to out |
| 994 | lower_first = lower_first |
| 1001 | ret = sort_idmaps - Sorts an array of idmap entries.* Can only be called if number of mappings exceeds UID_GID_MAP_MAX_BASE_EXTENTS. |
| 1006 | If 64 bytes -- 1 cache line <= UID_GID_MAP_MAX_BASE_EXTENTS Then |
| 1007 | No 3D Now!(extent, extent, 64 bytes -- 1 cache line * size of extent[0] ) |
| 1009 | Else |
| 1013 | smp_wmb() |
| 1018 | out : |
| 1019 | If ret < 0 && 64 bytes -- 1 cache line > UID_GID_MAP_MAX_BASE_EXTENTS Then |
| 1029 | Return ret |
| Name | Describe |
|---|---|
| proc_uid_map_write | |
| proc_gid_map_write | |
| proc_projid_map_write |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |