Defined in 1 files as a function:
Referenced in 5 files:
- kernel/bpf/arraymap.c
- kernel/bpf/hashtab.c
- kernel/bpf/local_storage.c
- kernel/bpf/syscall.c, line 358
- net/core/bpf_sk_storage.c, line 558
Smatch caller information:
kernel/bpf/local_storage.c bpf_cgroup_storage_alloc() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->objcg | 0,4096-ptr_max |
| PARAM_VALUE | 0 | map->objcg->memcg | 4096-ptr_max |
| PARAM_VALUE | 0 | map->objcg->memcg->css.refcnt.percpu_count_ptr | 1-u64max |
| NOCHECK_CALL | |||
| HALF_LOCKED2 | global &cgroup_mutex |
kernel/bpf/local_storage.c cgroup_storage_update_elem() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->lock.rlock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | map->objcg | 0,4096-ptr_max |
| PARAM_VALUE | 0 | map->objcg->memcg | 4096-ptr_max |
| PARAM_VALUE | 0 | map->objcg->memcg->css.refcnt.percpu_count_ptr | 1-u64max |
| PARAM_VALUE | 0 | map->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | map->ops->map_update_batch | 0,7911141981172039680 |
| PARAM_VALUE | 0 | map->value_size | 0-u32max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-1),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-1),1-s32max |
| DATA_SOURCE | 0 | map | $0 |
| NOCHECK_CALL | |||
| NO_OVERFLOW_SIMPLE | 0 | map->value_size | |
| HALF_LOCKED2 | rcu_read |
kernel/bpf/arraymap.c __bpf_array_map_seq_show() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | &seq->lock | ||
| TYPE_LOCK | (struct seq_file)->lock |
kernel/bpf/arraymap.c bpf_percpu_array_copy() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->map_type | 6 |
| PARAM_VALUE | 0 | map->ops | 0-8176211074560897023,8176211074560897025-u64max |
| PARAM_VALUE | 0 | map->ops->map_lookup_batch | 0,631431616227323904,968212869968297984,3636988385139924992,5229998854994575360,6341067303080312832,6609440822477774848 |
| PARAM_VALUE | 0 | map->ops->map_release | 0,4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 16,4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 1 | dst | (-1)-s32max |
| BUF_SIZE | 1 | dst | (-1)-s32max |
| CAPPED_DATA | 0 | map | 1 |
| DATA_SOURCE | 0 | map | $0 |
| DATA_SOURCE | 1 | dst | $2 |
| NOCHECK_CALL | |||
| UNITS | 1 | dst | unit_byte |
| LOCK2 | rcu_read |
kernel/bpf/arraymap.c bpf_percpu_array_copy() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->map_type | 6 |
| PARAM_VALUE | 0 | map->ops | 0-8176211074560897023,8176211074560897025-u64max |
| PARAM_VALUE | 0 | map->ops->map_lookup_batch | 0,631431616227323904,968212869968297984,3636988385139924992,5229998854994575360,6341067303080312832,6609440822477774848 |
| PARAM_VALUE | 0 | map->ops->map_release | 0,4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| CAPPED_DATA | 0 | map | 1 |
| DATA_SOURCE | 0 | map | $0 |
| NOCHECK_CALL | |||
| UNITS | 1 | dst | unit_byte |
| LOCK2 | rcu_read |
net/core/bpf_sk_storage.c diag_get() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| USER_DATA | 1 | *dst | s64min-s64max |
| USER_PTR | 1 | dst | |
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &ilb->lock |
kernel/bpf/syscall.c bpf_map_copy_value() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->map_type | 0-2,9,11,14-19,24-25,27-29,31-u32max |
| PARAM_VALUE | 0 | map->ops | 4096-8176211074560897023,8176211074560897025-ptr_max |
| PARAM_VALUE | 0 | map->ops->map_lookup_batch | 0,631431616227323904,968212869968297984,3636988385139924992,5229998854994575360,6341067303080312832,6609440822477774848 |
| PARAM_VALUE | 0 | map->ops->map_lookup_elem_sys_only | 0,1844650555866931200,2797019561733431296,5735237356065062912,8538665627833008128 |
| PARAM_VALUE | 0 | map->ops->map_release | 0,4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 16,4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 1 | dst | (-1)-s32max |
| BUF_SIZE | 1 | dst | (-1)-s32max |
| CAPPED_DATA | 0 | map | 1 |
| CAPPED_DATA | 0 | map->record->cnt | 1 |
| DATA_SOURCE | 0 | map | $0 |
| DATA_SOURCE | 1 | dst | $2 |
| NOCHECK_CALL | |||
| UNITS | 1 | dst | unit_byte |
| LOCK2 | rcu_read |
kernel/bpf/hashtab.c __bpf_hash_map_seq_show() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | &seq->lock | ||
| TYPE_LOCK | (struct seq_file)->lock |
kernel/bpf/hashtab.c __htab_map_lookup_and_delete_batch() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->elem_count | 4096-ptr_max |
| PARAM_VALUE | 0 | map->map_flags | 1-u32max |
| PARAM_VALUE | 0 | map->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 1 | dst | 1-u64max |
| BUF_SIZE | 1 | dst | 5-u32max,u64max |
| BUF_SIZE | 1 | dst | 5-u32max,u64max |
| NOCHECK_CALL | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | flags |
kernel/bpf/hashtab.c __htab_map_lookup_and_delete_batch() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->elem_count | 4096-ptr_max |
| PARAM_VALUE | 0 | map->map_flags | 1-u32max |
| PARAM_VALUE | 0 | map->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| NOCHECK_CALL | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | flags |
kernel/bpf/hashtab.c __htab_map_lookup_and_delete_batch() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | map->ops->map_lookup_and_delete_batch | 0,1162106831773184000,5857178533830610944,7056744708359086080,8047599492099870720,8153334481063559168 |
| PARAM_VALUE | 0 | map->ops->map_lookup_batch | 0,631431616227323904,968212869968297984,3636988385139924992,5229998854994575360,6341067303080312832,6609440822477774848 |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 1-u64max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 1 | dst | 5-u32max,u64max |
| BUF_SIZE | 1 | dst | 5-u32max,u64max |
| CAPPED_DATA | 0 | map->record->cnt | 1 |
| DATA_SOURCE | 0 | map | $0 |
| NOCHECK_CALL | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | flags |
kernel/bpf/hashtab.c __htab_map_lookup_and_delete_elem() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| PREEMPT_ADD | <- disables preempt | ||
| NOCHECK_CALL | |||
| LOCK2 | flags | ||
| LOCK2 | rcu_read |
kernel/bpf/hashtab.c __htab_map_lookup_and_delete_elem() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->key_size | 0-s32max |
| PARAM_VALUE | 0 | map->map_type | 1,5,7,9-10,35 |
| PARAM_VALUE | 0 | map->ops | 4096-8176211074560897023,8176211074560897025-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 16,4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 1 | dst | 0-s32max |
| BUF_SIZE | 1 | dst | 0-s32max |
| CAPPED_DATA | 0 | map->key_size | 1 |
| CAPPED_DATA | 0 | map->record->cnt | 1 |
| DATA_SOURCE | 0 | map | $0 |
| DATA_SOURCE | 1 | dst | $2 |
| BIT_INFO | 0 | map->map_type | 0x0,0x2f |
| PREEMPT_ADD | <- disables preempt | ||
| NOCHECK_CALL | |||
| LOCK2 | flags | ||
| LOCK2 | rcu_read |
kernel/bpf/hashtab.c __rhtab_map_lookup_and_delete_batch() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->key_size | 0-4000000 |
| PARAM_VALUE | 0 | map->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | map->ops->map_lookup_and_delete_batch | 0,1162106831773184000,5857178533830610944,7056744708359086080,8047599492099870720,8153334481063559168 |
| PARAM_VALUE | 0 | map->ops->map_lookup_batch | 0,631431616227323904,968212869968297984,3636988385139924992,5229998854994575360,6341067303080312832,6609440822477774848 |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 1 | dst | 1-u64max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 1 | dst | 0-u32max,u64max |
| BUF_SIZE | 1 | dst | 0-u32max,u64max |
| DATA_SOURCE | 0 | map | $0 |
| NOCHECK_CALL | |||
| LOCK2 | rcu_read |
kernel/bpf/hashtab.c bpf_percpu_hash_copy() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->map_type | 5,10 |
| PARAM_VALUE | 0 | map->ops | 0-8176211074560897023,8176211074560897025-u64max |
| PARAM_VALUE | 0 | map->ops->map_lookup_batch | 0,631431616227323904,968212869968297984,3636988385139924992,5229998854994575360,6341067303080312832,6609440822477774848 |
| PARAM_VALUE | 0 | map->ops->map_release | 0,4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 16,4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 1 | dst | (-1)-s32max |
| BUF_SIZE | 1 | dst | (-1)-s32max |
| CAPPED_DATA | 0 | map | 1 |
| CAPPED_DATA | 0 | map->key_size | 1 |
| DATA_SOURCE | 0 | map | $0 |
| DATA_SOURCE | 1 | dst | $2 |
| NOCHECK_CALL | |||
| UNITS | 1 | dst | unit_byte |
| LOCK2 | rcu_read |
kernel/bpf/hashtab.c bpf_percpu_hash_copy() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->map_type | 5,10 |
| PARAM_VALUE | 0 | map->ops | 0-8176211074560897023,8176211074560897025-u64max |
| PARAM_VALUE | 0 | map->ops->map_lookup_batch | 0,631431616227323904,968212869968297984,3636988385139924992,5229998854994575360,6341067303080312832,6609440822477774848 |
| PARAM_VALUE | 0 | map->ops->map_release | 0,4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-2),1-s32max |
| CAPPED_DATA | 0 | map | 1 |
| CAPPED_DATA | 0 | map->key_size | 1 |
| DATA_SOURCE | 0 | map | $0 |
| NOCHECK_CALL | |||
| UNITS | 1 | dst | unit_byte |
| LOCK2 | rcu_read |
kernel/bpf/hashtab.c rhtab_delete_elem() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 1 | dst | 16,4096-ptr_max |
| BUF_SIZE | 1 | dst | 0-s32max |
| BUF_SIZE | 1 | dst | 0-s32max |
| DATA_SOURCE | 1 | dst | $2 |
| NOCHECK_CALL | |||
| LOCK2 | rcu_read |
kernel/bpf/hashtab.c rhtab_map_update_elem() -> check_and_init_map_value()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | map | 4096-ptr_max |
| PARAM_VALUE | 0 | map->max_entries | 1-u32max |
| PARAM_VALUE | 0 | map->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | map->ops->map_update_batch | 0,7911141981172039680 |
| PARAM_VALUE | 0 | map->record | 0,4096-u64max |
| PARAM_VALUE | 0 | map->record->cnt | 0-s32max |
| PARAM_VALUE | 1 | dst | 4096-ptr_max |
| BUF_SIZE | 0 | map | s32min-(-1),1-s32max |
| BUF_SIZE | 0 | map | s32min-(-1),1-s32max |
| DATA_SOURCE | 0 | map | $0 |
| NOCHECK_CALL | |||
| LOCK2 | rcu_read |