Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 64) sorted by relevance

123

/kernel/
Djump_label.c72 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 …]
Dfutex.c205 union futex_key key; member
235 union futex_key key; member
244 .key = FUTEX_KEY_INIT,
334 static inline void futex_get_mm(union futex_key *key) in futex_get_mm() argument
336 mmgrab(key->private.mm); in futex_get_mm()
386 static struct futex_hash_bucket *hash_futex(union futex_key *key) in hash_futex() argument
388 u32 hash = jhash2((u32*)&key->both.word, in hash_futex()
389 (sizeof(key->both.word)+sizeof(key->both.ptr))/4, in hash_futex()
390 key->both.offset); in hash_futex()
415 static void get_futex_key_refs(union futex_key *key) in get_futex_key_refs() argument
[all …]
Duser_namespace.c226 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 …]
Daudit_tree.c27 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 …]
Dtracepoint.c233 if (tp->regfunc && !static_key_enabled(&tp->key)) { in tracepoint_add_func()
254 if (!static_key_enabled(&tp->key)) in tracepoint_add_func()
255 static_key_slow_inc(&tp->key); in tracepoint_add_func()
281 if (tp->unregfunc && static_key_enabled(&tp->key)) in tracepoint_remove_func()
284 if (static_key_enabled(&tp->key)) in tracepoint_remove_func()
285 static_key_slow_dec(&tp->key); in tracepoint_remove_func()
/kernel/sched/
Dwait_bit.c23 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 …]
Dwait.c9 …_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/
Dhashtab.c57 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()
405 static inline u32 htab_map_hash(const void *key, u32 key_len, u32 hashrnd) in htab_map_hash() argument
407 return jhash(key, key_len, hashrnd); in htab_map_hash()
422 void *key, u32 key_size) in lookup_elem_raw() argument
428 if (l->hash == hash && !memcmp(&l->key, key, key_size)) in lookup_elem_raw()
[all …]
Dlpm_trie.c166 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
243 matchlen = longest_prefix_match(trie, node, key); in trie_lookup_elem()
266 next_bit = extract_bit(key->data, node->prefixlen); in trie_lookup_elem()
306 struct bpf_lpm_trie_key *key = _key; in trie_update_elem() local
[all …]
Darraymap.c143 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 …]
Dlocal_storage.c49 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 …]
Ddevmap.c273 static int dev_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in dev_map_get_next_key() argument
276 u32 index = key ? *(u32 *)key : U32_MAX; in dev_map_get_next_key()
290 struct bpf_dtab_netdev *__dev_map_hash_lookup_elem(struct bpf_map *map, u32 key) in __dev_map_hash_lookup_elem() argument
293 struct hlist_head *head = dev_map_index_hash(dtab, key); in __dev_map_hash_lookup_elem()
297 if (dev->idx == key) in __dev_map_hash_lookup_elem()
303 static int dev_map_hash_get_next_key(struct bpf_map *map, void *key, in dev_map_hash_get_next_key() argument
312 if (!key) in dev_map_hash_get_next_key()
315 idx = *(u32 *)key; in dev_map_hash_get_next_key()
420 struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key) in __dev_map_lookup_elem() argument
425 if (key >= map->max_entries) in __dev_map_lookup_elem()
[all …]
Dxskmap.c146 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 …]
Dreuseport_array.c49 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()
Dsyscall.c720 int __weak bpf_stackmap_copy(struct bpf_map *map, void *key, void *value) in bpf_stackmap_copy() argument
741 void __user *ukey = u64_to_user_ptr(attr->key); in map_lookup_elem()
745 void *key, *value, *ptr; in map_lookup_elem() local
771 key = __bpf_copy_key(ukey, map->key_size); in map_lookup_elem()
772 if (IS_ERR(key)) { in map_lookup_elem()
773 err = PTR_ERR(key); in map_lookup_elem()
793 err = bpf_map_offload_lookup_elem(map, key, value); in map_lookup_elem()
801 err = bpf_percpu_hash_copy(map, key, value); in map_lookup_elem()
803 err = bpf_percpu_array_copy(map, key, value); in map_lookup_elem()
805 err = bpf_percpu_cgroup_storage_copy(map, key, value); in map_lookup_elem()
[all …]
Dcpumap.c455 static int cpu_map_delete_elem(struct bpf_map *map, void *key) in cpu_map_delete_elem() argument
458 u32 key_cpu = *(u32 *)key; in cpu_map_delete_elem()
468 static int cpu_map_update_elem(struct bpf_map *map, void *key, void *value, in cpu_map_update_elem() argument
475 u32 key_cpu = *(u32 *)key; in cpu_map_update_elem()
555 struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) in __cpu_map_lookup_elem() argument
560 if (key >= map->max_entries) in __cpu_map_lookup_elem()
563 rcpu = READ_ONCE(cmap->cpu_map[key]); in __cpu_map_lookup_elem()
567 static void *cpu_map_lookup_elem(struct bpf_map *map, void *key) in cpu_map_lookup_elem() argument
570 __cpu_map_lookup_elem(map, *(u32 *)key); in cpu_map_lookup_elem()
575 static int cpu_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in cpu_map_get_next_key() argument
[all …]
Dinode.c152 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
205 prev_key = key; in map_seq_next()
207 if (map->ops->map_get_next_key(map, prev_key, key)) { in map_seq_next()
213 return key; in map_seq_next()
221 return *pos ? map_iter(m)->key : SEQ_START_TOKEN; in map_seq_start()
231 void *key = map_iter(m)->key; in map_seq_show() local
[all …]
Dstackmap.c514 static void *stack_map_lookup_elem(struct bpf_map *map, void *key) in stack_map_lookup_elem() argument
520 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value) in bpf_stackmap_copy() argument
524 u32 id = *(u32 *)key, trace_len; in bpf_stackmap_copy()
543 static int stack_map_get_next_key(struct bpf_map *map, void *key, in stack_map_get_next_key() argument
552 if (!key) { in stack_map_get_next_key()
555 id = *(u32 *)key; in stack_map_get_next_key()
572 static int stack_map_update_elem(struct bpf_map *map, void *key, void *value, in stack_map_update_elem() argument
579 static int stack_map_delete_elem(struct bpf_map *map, void *key) in stack_map_delete_elem() argument
583 u32 id = *(u32 *)key; in stack_map_delete_elem()
Dhelpers.c26 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()
Doffload.c434 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()
/kernel/trace/
Dtracing_map.c396 kfree(elt->key); in tracing_map_elt_free()
411 elt->key = kzalloc(map->key_size, GFP_KERNEL); in tracing_map_elt_alloc()
412 if (!elt->key) { in tracing_map_elt_alloc()
502 static inline bool keys_match(void *key, void *test_key, unsigned key_size) in keys_match() argument
506 if (memcmp(key, test_key, key_size)) in keys_match()
513 __tracing_map_insert(struct tracing_map *map, void *key, bool lookup_only) in __tracing_map_insert() argument
520 key_hash = jhash(key, map->key_size, 0); in __tracing_map_insert()
528 test_key = entry->key; in __tracing_map_insert()
533 keys_match(key, val->key, map->key_size)) { in __tracing_map_insert()
563 if (!cmpxchg(&entry->key, 0, key_hash)) { in __tracing_map_insert()
[all …]
Dtracing_map.h143 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/
Dkdb_io.c60 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/
Dlockdep.c342 #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 …]
Dspinlock_debug.c17 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()

123