Function report |
Source Code:kernel\bpf\syscall.c |
Create Date:2022-07-28 12:52:47 |
Last Modify:2022-05-19 18:06:12 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:map_get_next_key
Proto:static int map_get_next_key(union bpf_attr *attr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
union bpf_attr * | attr |
1119 | __user * ukey = u64_to_user_ptr(key) |
1120 | __user * unext_key = u64_to_user_ptr(next_key) |
1127 | If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_MAP_GET_NEXT_KEY) Then Return -EINVAL |
1131 | map = error is returned, fd is released.* On success caller should complete fd access with matching fdput() |
1134 | If Not (map_get_sys_perms(map, f) & Has read method(s) ) Then |
1139 | If ukey Then |
1140 | key = __bpf_copy_key(ukey, key_size) |
1145 | Else |
1146 | key = NULL |
1150 | next_key = Allocation memory |
1154 | If bpf_map_is_dev_bound(map) Then |
1160 | err = map_get_next_key(map, key, next_key) |
1162 | out : |
1163 | If err Then Go to free_next_key |
1167 | If copy_to_user(unext_key, next_key, key_size) != 0 Then Go to free_next_key |
1170 | err = 0 |
1172 | free_next_key : |
1174 | free_key : |
1176 | err_put : |
1178 | Return err |
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 |