/kernel/ |
D | jump_label.c | 72 jea->key = jeb->key - delta; in jump_label_swap() 76 jeb->key = tmp.key + delta; in jump_label_swap() 93 static void jump_label_update(struct static_key *key); 104 int static_key_count(struct static_key *key) in static_key_count() argument 110 int n = atomic_read(&key->enabled); in static_key_count() 116 void static_key_slow_inc_cpuslocked(struct static_key *key) in static_key_slow_inc_cpuslocked() argument 120 STATIC_KEY_CHECK_USE(key); in static_key_slow_inc_cpuslocked() 135 for (v = atomic_read(&key->enabled); v > 0; v = v1) { in static_key_slow_inc_cpuslocked() 136 v1 = atomic_cmpxchg(&key->enabled, v, v + 1); in static_key_slow_inc_cpuslocked() 142 if (atomic_read(&key->enabled) == 0) { in static_key_slow_inc_cpuslocked() [all …]
|
D | futex.c | 206 union futex_key key; member 236 union futex_key key; member 245 .key = FUTEX_KEY_INIT, 335 static inline void futex_get_mm(union futex_key *key) in futex_get_mm() argument 337 mmgrab(key->private.mm); in futex_get_mm() 387 static struct futex_hash_bucket *hash_futex(union futex_key *key) in hash_futex() argument 389 u32 hash = jhash2((u32 *)key, offsetof(typeof(*key), both.offset) / 4, in hash_futex() 390 key->both.offset); in hash_futex() 416 static void get_futex_key_refs(union futex_key *key) in get_futex_key_refs() argument 418 if (!key->both.ptr) in get_futex_key_refs() [all …]
|
D | user_namespace.c | 226 const struct idmap_key *key = k; in cmp_map_id() local 229 id2 = key->id + key->count - 1; in cmp_map_id() 232 if (key->map_up) in cmp_map_id() 239 if (key->id >= first && key->id <= last && in cmp_map_id() 243 if (key->id < first || id2 < first) in cmp_map_id() 256 struct idmap_key key; in map_id_range_down_max() local 258 key.map_up = false; in map_id_range_down_max() 259 key.count = count; in map_id_range_down_max() 260 key.id = id; in map_id_range_down_max() 262 return bsearch(&key, map->forward, extents, in map_id_range_down_max() [all …]
|
D | audit_tree.c | 27 unsigned long key; member 221 static inline struct list_head *chunk_hash(unsigned long key) in chunk_hash() argument 223 unsigned long n = key / L1_CACHE_BYTES; in chunk_hash() 238 WARN_ON_ONCE(!chunk->key); in insert_hash() 239 list = chunk_hash(chunk->key); in insert_hash() 246 unsigned long key = inode_to_key(inode); in audit_tree_lookup() local 247 struct list_head *list = chunk_hash(key); in audit_tree_lookup() 255 if (READ_ONCE(p->key) == key) { in audit_tree_lookup() 300 new->key = old->key; in replace_chunk() 442 chunk->key = inode_to_key(inode); in create_chunk() [all …]
|
/kernel/sched/ |
D | wait_bit.c | 23 struct wait_bit_key *key = arg; in wake_bit_function() local 26 if (wait_bit->key.flags != key->flags || in wake_bit_function() 27 wait_bit->key.bit_nr != key->bit_nr || in wake_bit_function() 28 test_bit(key->bit_nr, key->flags)) in wake_bit_function() 31 return autoremove_wake_function(wq_entry, mode, sync, key); in wake_bit_function() 48 if (test_bit(wbq_entry->key.bit_nr, wbq_entry->key.flags)) in __wait_on_bit() 49 ret = (*action)(&wbq_entry->key, mode); in __wait_on_bit() 50 } while (test_bit(wbq_entry->key.bit_nr, wbq_entry->key.flags) && !ret); in __wait_on_bit() 75 wq_entry.key.timeout = jiffies + timeout; in out_of_line_wait_on_bit_timeout() 89 if (test_bit(wbq_entry->key.bit_nr, wbq_entry->key.flags)) { in __wait_on_bit_lock() [all …]
|
D | wait.c | 9 …_init_waitqueue_head(struct wait_queue_head *wq_head, const char *name, struct lock_class_key *key) in __init_waitqueue_head() argument 12 lockdep_set_class_and_name(&wq_head->lock, key, name); in __init_waitqueue_head() 67 int nr_exclusive, int wake_flags, void *key, in __wake_up_common() argument 93 ret = curr->func(curr, mode, wake_flags, key); in __wake_up_common() 111 int nr_exclusive, int wake_flags, void *key) in __wake_up_common_lock() argument 124 wake_flags, key, &bookmark); in __wake_up_common_lock() 140 int nr_exclusive, void *key) in __wake_up() argument 142 __wake_up_common_lock(wq_head, mode, nr_exclusive, 0, key); in __wake_up() 155 void __wake_up_locked_key(struct wait_queue_head *wq_head, unsigned int mode, void *key) in __wake_up_locked_key() argument 157 __wake_up_common(wq_head, mode, 1, 0, key, NULL); in __wake_up_locked_key() [all …]
|
/kernel/bpf/ |
D | hashtab.c | 57 char key[0] __aligned(8); member 82 *(void __percpu **)(l->key + key_size) = pptr; in htab_elem_set_ptr() 87 return *(void __percpu **)(l->key + key_size); in htab_elem_get_ptr() 92 return *(void **)(l->key + roundup(map->key_size, 8)); in fd_htab_map_get_ptr() 119 static struct htab_elem *prealloc_lru_pop(struct bpf_htab *htab, void *key, in prealloc_lru_pop() argument 127 memcpy(l->key, key, htab->map.key_size); in prealloc_lru_pop() 409 static inline u32 htab_map_hash(const void *key, u32 key_len, u32 hashrnd) in htab_map_hash() argument 411 return jhash(key, key_len, hashrnd); in htab_map_hash() 426 void *key, u32 key_size) in lookup_elem_raw() argument 432 if (l->hash == hash && !memcmp(&l->key, key, key_size)) in lookup_elem_raw() [all …]
|
D | lpm_trie.c | 166 const struct bpf_lpm_trie_key *key) in longest_prefix_match() argument 168 u32 limit = min(node->prefixlen, key->prefixlen); in longest_prefix_match() 181 *(__be64 *)key->data); in longest_prefix_match() 194 *(__be32 *)&key->data[i]); in longest_prefix_match() 206 *(__be16 *)&key->data[i]); in longest_prefix_match() 217 prefixlen += 8 - fls(node->data[i] ^ key->data[i]); in longest_prefix_match() 231 struct bpf_lpm_trie_key *key = _key; in trie_lookup_elem() local 233 if (key->prefixlen > trie->max_prefixlen) in trie_lookup_elem() 246 matchlen = longest_prefix_match(trie, node, key); in trie_lookup_elem() 269 next_bit = extract_bit(key->data, node->prefixlen); in trie_lookup_elem() [all …]
|
D | arraymap.c | 143 static void *array_map_lookup_elem(struct bpf_map *map, void *key) in array_map_lookup_elem() argument 146 u32 index = *(u32 *)key; in array_map_lookup_elem() 215 static void *percpu_array_map_lookup_elem(struct bpf_map *map, void *key) in percpu_array_map_lookup_elem() argument 218 u32 index = *(u32 *)key; in percpu_array_map_lookup_elem() 226 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value) in bpf_percpu_array_copy() argument 229 u32 index = *(u32 *)key; in bpf_percpu_array_copy() 253 static int array_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in array_map_get_next_key() argument 256 u32 index = key ? *(u32 *)key : U32_MAX; in array_map_get_next_key() 272 static int array_map_update_elem(struct bpf_map *map, void *key, void *value, in array_map_update_elem() argument 276 u32 index = *(u32 *)key; in array_map_update_elem() [all …]
|
D | local_storage.c | 49 struct bpf_cgroup_storage_map *map, struct bpf_cgroup_storage_key *key, in cgroup_storage_lookup() argument 64 switch (bpf_cgroup_storage_key_cmp(key, &storage->key)) { in cgroup_storage_lookup() 96 switch (bpf_cgroup_storage_key_cmp(&storage->key, &this->key)) { in cgroup_storage_insert() 117 struct bpf_cgroup_storage_key *key = _key; in cgroup_storage_lookup_elem() local 120 storage = cgroup_storage_lookup(map, key, false); in cgroup_storage_lookup_elem() 130 struct bpf_cgroup_storage_key *key = _key; in cgroup_storage_update_elem() local 145 key, false); in cgroup_storage_update_elem() 174 struct bpf_cgroup_storage_key *key = _key; in bpf_percpu_cgroup_storage_copy() local 180 storage = cgroup_storage_lookup(map, key, false); in bpf_percpu_cgroup_storage_copy() 204 struct bpf_cgroup_storage_key *key = _key; in bpf_percpu_cgroup_storage_update() local [all …]
|
D | devmap.c | 275 static int dev_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in dev_map_get_next_key() argument 278 u32 index = key ? *(u32 *)key : U32_MAX; in dev_map_get_next_key() 292 struct bpf_dtab_netdev *__dev_map_hash_lookup_elem(struct bpf_map *map, u32 key) in __dev_map_hash_lookup_elem() argument 295 struct hlist_head *head = dev_map_index_hash(dtab, key); in __dev_map_hash_lookup_elem() 300 if (dev->idx == key) in __dev_map_hash_lookup_elem() 306 static int dev_map_hash_get_next_key(struct bpf_map *map, void *key, in dev_map_hash_get_next_key() argument 315 if (!key) in dev_map_hash_get_next_key() 318 idx = *(u32 *)key; in dev_map_hash_get_next_key() 423 struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key) in __dev_map_lookup_elem() argument 428 if (key >= map->max_entries) in __dev_map_lookup_elem() [all …]
|
D | xskmap.c | 146 static int xsk_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in xsk_map_get_next_key() argument 149 u32 index = key ? *(u32 *)key : U32_MAX; in xsk_map_get_next_key() 163 struct xdp_sock *__xsk_map_lookup_elem(struct bpf_map *map, u32 key) in __xsk_map_lookup_elem() argument 168 if (key >= map->max_entries) in __xsk_map_lookup_elem() 171 xs = READ_ONCE(m->xsk_map[key]); in __xsk_map_lookup_elem() 204 static void *xsk_map_lookup_elem(struct bpf_map *map, void *key) in xsk_map_lookup_elem() argument 207 return __xsk_map_lookup_elem(map, *(u32 *)key); in xsk_map_lookup_elem() 210 static void *xsk_map_lookup_elem_sys_only(struct bpf_map *map, void *key) in xsk_map_lookup_elem_sys_only() argument 215 static int xsk_map_update_elem(struct bpf_map *map, void *key, void *value, in xsk_map_update_elem() argument 220 u32 i = *(u32 *)key, fd = *(u32 *)value; in xsk_map_update_elem() [all …]
|
D | reuseport_array.c | 49 static void *reuseport_array_lookup_elem(struct bpf_map *map, void *key) in reuseport_array_lookup_elem() argument 52 u32 index = *(u32 *)key; in reuseport_array_lookup_elem() 61 static int reuseport_array_delete_elem(struct bpf_map *map, void *key) in reuseport_array_delete_elem() argument 64 u32 index = *(u32 *)key; in reuseport_array_delete_elem() 181 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_lookup_elem() argument 191 sk = reuseport_array_lookup_elem(map, key); in bpf_fd_reuseport_array_lookup_elem() 248 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_update_elem() argument 254 u32 index = *(u32 *)key; in bpf_fd_reuseport_array_update_elem() 334 static int reuseport_array_get_next_key(struct bpf_map *map, void *key, in reuseport_array_get_next_key() argument 338 u32 index = key ? *(u32 *)key : U32_MAX; in reuseport_array_get_next_key()
|
D | syscall.c | 721 int __weak bpf_stackmap_copy(struct bpf_map *map, void *key, void *value) in bpf_stackmap_copy() argument 742 void __user *ukey = u64_to_user_ptr(attr->key); in map_lookup_elem() 746 void *key, *value, *ptr; in map_lookup_elem() local 772 key = __bpf_copy_key(ukey, map->key_size); in map_lookup_elem() 773 if (IS_ERR(key)) { in map_lookup_elem() 774 err = PTR_ERR(key); in map_lookup_elem() 794 err = bpf_map_offload_lookup_elem(map, key, value); in map_lookup_elem() 802 err = bpf_percpu_hash_copy(map, key, value); in map_lookup_elem() 804 err = bpf_percpu_array_copy(map, key, value); in map_lookup_elem() 806 err = bpf_percpu_cgroup_storage_copy(map, key, value); in map_lookup_elem() [all …]
|
D | inode.c | 152 void *key; member 169 kfree(iter->key); in map_iter_free() 182 iter->key = kzalloc(map->key_size, GFP_KERNEL | __GFP_NOWARN); in map_iter_alloc() 183 if (!iter->key) in map_iter_alloc() 196 void *key = map_iter(m)->key; in map_seq_next() local 206 prev_key = key; in map_seq_next() 209 if (map->ops->map_get_next_key(map, prev_key, key)) { in map_seq_next() 211 key = NULL; in map_seq_next() 214 return key; in map_seq_next() 222 return *pos ? map_iter(m)->key : SEQ_START_TOKEN; in map_seq_start() [all …]
|
D | cpumap.c | 458 static int cpu_map_delete_elem(struct bpf_map *map, void *key) in cpu_map_delete_elem() argument 461 u32 key_cpu = *(u32 *)key; in cpu_map_delete_elem() 471 static int cpu_map_update_elem(struct bpf_map *map, void *key, void *value, in cpu_map_update_elem() argument 478 u32 key_cpu = *(u32 *)key; in cpu_map_update_elem() 558 struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) in __cpu_map_lookup_elem() argument 563 if (key >= map->max_entries) in __cpu_map_lookup_elem() 566 rcpu = READ_ONCE(cmap->cpu_map[key]); in __cpu_map_lookup_elem() 570 static void *cpu_map_lookup_elem(struct bpf_map *map, void *key) in cpu_map_lookup_elem() argument 573 __cpu_map_lookup_elem(map, *(u32 *)key); in cpu_map_lookup_elem() 578 static int cpu_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in cpu_map_get_next_key() argument [all …]
|
D | stackmap.c | 520 static void *stack_map_lookup_elem(struct bpf_map *map, void *key) in stack_map_lookup_elem() argument 526 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value) in bpf_stackmap_copy() argument 530 u32 id = *(u32 *)key, trace_len; in bpf_stackmap_copy() 549 static int stack_map_get_next_key(struct bpf_map *map, void *key, in stack_map_get_next_key() argument 558 if (!key) { in stack_map_get_next_key() 561 id = *(u32 *)key; in stack_map_get_next_key() 578 static int stack_map_update_elem(struct bpf_map *map, void *key, void *value, in stack_map_update_elem() argument 585 static int stack_map_delete_elem(struct bpf_map *map, void *key) in stack_map_delete_elem() argument 589 u32 id = *(u32 *)key; in stack_map_delete_elem()
|
D | helpers.c | 26 BPF_CALL_2(bpf_map_lookup_elem, struct bpf_map *, map, void *, key) in BPF_CALL_2() argument 29 return (unsigned long) map->ops->map_lookup_elem(map, key); in BPF_CALL_2() 41 BPF_CALL_4(bpf_map_update_elem, struct bpf_map *, map, void *, key, in BPF_CALL_4() argument 45 return map->ops->map_update_elem(map, key, value, flags); in BPF_CALL_4() 59 BPF_CALL_2(bpf_map_delete_elem, struct bpf_map *, map, void *, key) in BPF_CALL_2() argument 62 return map->ops->map_delete_elem(map, key); in BPF_CALL_2()
|
D | offload.c | 434 int bpf_map_offload_lookup_elem(struct bpf_map *map, void *key, void *value) in bpf_map_offload_lookup_elem() argument 441 ret = offmap->dev_ops->map_lookup_elem(offmap, key, value); in bpf_map_offload_lookup_elem() 448 void *key, void *value, u64 flags) in bpf_map_offload_update_elem() argument 458 ret = offmap->dev_ops->map_update_elem(offmap, key, value, in bpf_map_offload_update_elem() 465 int bpf_map_offload_delete_elem(struct bpf_map *map, void *key) in bpf_map_offload_delete_elem() argument 472 ret = offmap->dev_ops->map_delete_elem(offmap, key); in bpf_map_offload_delete_elem() 478 int bpf_map_offload_get_next_key(struct bpf_map *map, void *key, void *next_key) in bpf_map_offload_get_next_key() argument 485 ret = offmap->dev_ops->map_get_next_key(offmap, key, next_key); in bpf_map_offload_get_next_key()
|
D | queue_stack_maps.c | 255 static void *queue_stack_map_lookup_elem(struct bpf_map *map, void *key) in queue_stack_map_lookup_elem() argument 261 static int queue_stack_map_update_elem(struct bpf_map *map, void *key, in queue_stack_map_update_elem() argument 268 static int queue_stack_map_delete_elem(struct bpf_map *map, void *key) in queue_stack_map_delete_elem() argument 274 static int queue_stack_map_get_next_key(struct bpf_map *map, void *key, in queue_stack_map_get_next_key() argument
|
/kernel/trace/ |
D | tracing_map.c | 399 kfree(elt->key); in tracing_map_elt_free() 414 elt->key = kzalloc(map->key_size, GFP_KERNEL); in tracing_map_elt_alloc() 415 if (!elt->key) { in tracing_map_elt_alloc() 505 static inline bool keys_match(void *key, void *test_key, unsigned key_size) in keys_match() argument 509 if (memcmp(key, test_key, key_size)) in keys_match() 516 __tracing_map_insert(struct tracing_map *map, void *key, bool lookup_only) in __tracing_map_insert() argument 523 key_hash = jhash(key, map->key_size, 0); in __tracing_map_insert() 531 test_key = entry->key; in __tracing_map_insert() 536 keys_match(key, val->key, map->key_size)) { in __tracing_map_insert() 566 if (!cmpxchg(&entry->key, 0, key_hash)) { in __tracing_map_insert() [all …]
|
D | tracing_map.h | 143 void *key; member 148 u32 key; member 158 void *key; member 257 tracing_map_insert(struct tracing_map *map, void *key); 259 tracing_map_lookup(struct tracing_map *map, void *key);
|
/kernel/debug/kdb/ |
D | kdb_io.c | 60 int key; in kdb_read_get_key() local 74 key = *ped++; in kdb_read_get_key() 79 key = (*f)(); in kdb_read_get_key() 80 if (key == -1) { in kdb_read_get_key() 88 if (key == '\r') in kdb_read_get_key() 89 key = '\n'; in kdb_read_get_key() 90 *buffer++ = key; in kdb_read_get_key() 94 if (escape_delay == 0 && key == '\e') { in kdb_read_get_key() 100 *ped++ = key; in kdb_read_get_key() 110 if (key != '[') in kdb_read_get_key() [all …]
|
/kernel/locking/ |
D | lockdep.c | 342 #define __classhashfn(key) hash_long((unsigned long)key, CLASSHASH_BITS) argument 343 #define classhashentry(key) (classhash_table + __classhashfn((key))) argument 364 static inline u64 iterate_chain_key(u64 key, u32 idx) in iterate_chain_key() argument 366 u32 k0 = key, k1 = key >> 32; in iterate_chain_key() 581 const char *__get_key_name(const struct lockdep_subclass_key *key, char *str) in __get_key_name() argument 583 return kallsyms_lookup((unsigned long)key, NULL, NULL, NULL, str); in __get_key_name() 637 name = __get_key_name(class->key, str); in __print_lock_name() 666 name = __get_key_name(lock->key->subkeys, str); in print_lockdep_cache() 781 if (new_class->key - new_class->subclass == class->key) in count_matching_names() 793 struct lockdep_subclass_key *key; in look_up_lock_class() local [all …]
|
D | spinlock_debug.c | 17 struct lock_class_key *key) in __raw_spin_lock_init() argument 24 lockdep_init_map(&lock->dep_map, name, key, 0); in __raw_spin_lock_init() 35 struct lock_class_key *key) in __rwlock_init() argument 42 lockdep_init_map(&lock->dep_map, name, key, 0); in __rwlock_init()
|