函数逻辑报告 |
Source Code:kernel\user_namespace.c |
Create Date:2022-07-27 12:22:12 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:map_write
函数原型: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)
返回类型:ssize_t
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| 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 | 如果 64 bytes -- 1 cache line 不等于0则转到: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 | 如果next_line则 |
| 916 | first等于转换字符串为无符号整形 |
| 917 | 如果非Note: isspace() must return false for %NUL-terminator ( * pos)则转到:out |
| 921 | lower_first等于转换字符串为无符号整形 |
| 922 | 如果非Note: isspace() must return false for %NUL-terminator ( * pos)则转到:out |
| 926 | count等于转换字符串为无符号整形 |
| 927 | 如果pos且非Note: isspace() must return false for %NUL-terminator ( * pos)则转到:out |
| 936 | 如果((first == (u32) - 1) || (lower_first == (u32) - 1))则转到:out |
| 945 | 如果lower_first加count小于等于lower_first则转到:out |
| 950 | 如果mappings_overlap( & new_map, & extent)则转到:out |
| 953 | 如果(( 64 bytes -- 1 cache line + 1) == UID_GID_MAP_MAX_EXTENTS && (next_line != NULL))则转到:out |
| 963 | 如果 64 bytes -- 1 cache line 恒等于0则转到:out |
| 975 | 以idx小于 64 bytes -- 1 cache line 循环 |
| 979 | 如果 64 bytes -- 1 cache line 小于等于UID_GID_MAP_MAX_BASE_EXTENTS则e等于extent[idx] |
| 991 | 如果(lower_first == (u32) - 1)则转到: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 | 如果 64 bytes -- 1 cache line 小于等于UID_GID_MAP_MAX_BASE_EXTENTS则 |
| 1007 | 内存复制(extent, extent, 64 bytes -- 1 cache line * extent[0]的长度) |
| 1009 | 否则 |
| 1013 | smp_wmb() |
| 1018 | out : |
| 1019 | 如果ret小于0且 64 bytes -- 1 cache line 大于UID_GID_MAP_MAX_BASE_EXTENTS则 |
| 1029 | 返回:ret |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |