Home
last modified time | relevance | path

Searched full:keys (Results 1 – 25 of 1768) sorted by relevance

12345678910>>...71

/linux/tools/testing/selftests/bpf/progs/
H A Dbpf_flow.c75 static __always_inline int export_flow_keys(struct bpf_flow_keys *keys, in export_flow_keys() argument
78 __u32 key = (__u32)(keys->sport) << 16 | keys->dport; in export_flow_keys()
81 memcpy(&val, keys, sizeof(val)); in export_flow_keys()
118 struct bpf_flow_keys *keys = skb->flow_keys; in parse_eth_proto() local
137 return export_flow_keys(keys, BPF_DROP); in parse_eth_proto()
140 return export_flow_keys(keys, BPF_DROP); in parse_eth_proto()
146 struct bpf_flow_keys *keys = skb->flow_keys; in _dissect() local
148 if (keys->n_proto == bpf_htons(ETH_P_IP)) { in _dissect()
161 return parse_eth_proto(skb, keys->n_proto); in _dissect()
167 struct bpf_flow_keys *keys = skb->flow_keys; in parse_ip_proto() local
[all …]
/linux/drivers/input/keyboard/
H A Dmtk-pmic-keys.c138 struct mtk_pmic_keys *keys; member
150 struct mtk_pmic_keys_info keys[MTK_PMIC_MAX_KEY_COUNT]; member
159 static void mtk_pmic_keys_lp_reset_setup(struct mtk_pmic_keys *keys, in mtk_pmic_keys_lp_reset_setup() argument
170 error = of_property_read_u32(keys->dev->of_node, "power-off-time-sec", in mtk_pmic_keys_lp_reset_setup()
178 error = of_property_read_u32(keys->dev->of_node, in mtk_pmic_keys_lp_reset_setup()
202 regmap_update_bits(keys->regmap, regs->pmic_rst_reg, mask, value); in mtk_pmic_keys_lp_reset_setup()
210 regmap_read(info->keys->regmap, info->regs->deb_reg, &key_deb); in mtk_pmic_keys_irq_handler_thread()
216 input_report_key(info->keys->input_dev, info->keycode, pressed); in mtk_pmic_keys_irq_handler_thread()
217 input_sync(info->keys->input_dev); in mtk_pmic_keys_irq_handler_thread()
219 dev_dbg(info->keys->dev, "(%s) key =%d using PMIC\n", in mtk_pmic_keys_irq_handler_thread()
[all …]
/linux/arch/arm64/include/asm/
H A Dpointer_auth.h33 * We give each process its own keys, which are shared by all threads. The keys
57 static __always_inline void ptrauth_keys_init_kernel(struct ptrauth_keys_kernel *keys) in ptrauth_keys_init_kernel() argument
60 get_random_bytes(&keys->apia, sizeof(keys->apia)); in ptrauth_keys_init_kernel()
63 static __always_inline void ptrauth_keys_switch_kernel(struct ptrauth_keys_kernel *keys) in ptrauth_keys_switch_kernel() argument
68 __ptrauth_key_install_nosync(APIA, keys->apia); in ptrauth_keys_switch_kernel()
74 static inline void ptrauth_keys_install_user(struct ptrauth_keys_user *keys) in ptrauth_keys_install_user() argument
77 __ptrauth_key_install_nosync(APIB, keys->apib); in ptrauth_keys_install_user()
78 __ptrauth_key_install_nosync(APDA, keys->apda); in ptrauth_keys_install_user()
79 __ptrauth_key_install_nosync(APDB, keys->apdb); in ptrauth_keys_install_user()
83 __ptrauth_key_install_nosync(APGA, keys->apga); in ptrauth_keys_install_user()
[all …]
/linux/security/integrity/
H A DKconfig22 select KEYS
29 to "lock" certain keyring to prevent adding new keys.
30 This is useful for evm and module keyrings, when keys are
34 bool "Enable asymmetric keys support"
44 asymmetric keys.
47 bool "Require all keys on the integrity keyrings be signed"
52 This option requires that all keys added to the .ima and
57 bool "Provide keyring for platform/firmware trusted keys"
61 Provide a separate, distinct keyring for platform trusted keys, which
67 bool "Provide a keyring to which Machine Owner Keys may be added"
[all …]
/linux/tools/testing/selftests/net/
H A Dtcp_fastopen_backup_key.c5 * New keys are 'rotated' in two steps:
7 * 2) Make new key the primary by swapping the backup and primary keys
49 static void get_keys(int fd, uint32_t *keys) in get_keys() argument
55 if (getsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, &len)) in get_keys()
62 if (sscanf(buf, "%x-%x-%x-%x,%x-%x-%x-%x", keys, keys + 1, keys + 2, in get_keys()
63 keys + 3, keys + 4, keys + 5, keys + 6, keys + 7) != 8) in get_keys()
67 static void set_keys(int fd, uint32_t *keys) in set_keys() argument
72 if (setsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, in set_keys()
79 keys[0], keys[1], keys[2], keys[3], keys[4], keys[5], in set_keys()
80 keys[6], keys[7]); in set_keys()
[all …]
/linux/tools/testing/selftests/bpf/map_tests/
H A Dhtab_map_batch_ops.c14 static void map_batch_update(int map_fd, __u32 max_entries, int *keys, in map_batch_update() argument
29 keys[i] = i + 1; in map_batch_update()
37 err = bpf_map_update_batch(map_fd, keys, values, &max_entries, &opts); in map_batch_update()
42 int *keys, void *values, bool is_pcpu) in map_batch_verify() argument
56 CHECK(keys[i] + 1 + j != bpf_percpu(v[i], j), in map_batch_verify()
59 i, j, keys[i], bpf_percpu(v[i], j)); in map_batch_verify()
62 CHECK(keys[i] + 1 != ((int *)values)[i], in map_batch_verify()
64 "error: i %d key %d value %d\n", i, keys[i], in map_batch_verify()
73 "error: keys array at index %d missing\n", i); in map_batch_verify()
81 int map_fd, *keys, *visited, key; in __test_map_lookup_and_delete_batch() local
[all …]
H A Darray_map_batch_ops.c15 static void map_batch_update(int map_fd, __u32 max_entries, int *keys, in map_batch_update() argument
26 keys[i] = i; in map_batch_update()
36 err = bpf_map_update_batch(map_fd, keys, values, &max_entries, &opts); in map_batch_update()
40 static void map_batch_verify(int *visited, __u32 max_entries, int *keys, in map_batch_verify() argument
52 CHECK(keys[i] + j + 1 != value, in map_batch_verify()
55 j, keys[i], value); in map_batch_verify()
58 CHECK(keys[i] + 1 != values[i], "key/value checking", in map_batch_verify()
59 "error: i %d key %d value %lld\n", i, keys[i], in map_batch_verify()
66 "error: keys array at index %d missing\n", i); in map_batch_verify()
72 int map_fd, *keys, *visited; in __test_map_lookup_and_update_batch() local
[all …]
H A Dlpm_trie_map_batch_ops.c23 struct test_lpm_key *keys, int *values) in map_batch_update() argument
34 keys[i].prefix = 32; in map_batch_update()
36 inet_pton(AF_INET, buff, &keys[i].ipv4); in map_batch_update()
40 err = bpf_map_update_batch(map_fd, keys, values, &max_entries, &opts); in map_batch_update()
45 struct test_lpm_key *keys, int *values) in map_batch_verify() argument
53 inet_ntop(AF_INET, &keys[i].ipv4, buff, 32); in map_batch_verify()
62 "error: keys array at index %d missing\n", i); in map_batch_verify()
69 struct test_lpm_key *keys, key; in test_lpm_trie_map_batch_ops() local
86 keys = malloc(max_entries * sizeof(struct test_lpm_key)); in test_lpm_trie_map_batch_ops()
89 CHECK(!keys || !values || !visited, "malloc()", "error:%s\n", in test_lpm_trie_map_batch_ops()
[all …]
/linux/arch/arm64/kernel/
H A Dpointer_auth.c13 struct ptrauth_keys_user *keys = &tsk->thread.keys_user; in ptrauth_prctl_reset_keys() local
25 ptrauth_keys_init_user(keys); in ptrauth_prctl_reset_keys()
37 get_random_bytes(&keys->apia, sizeof(keys->apia)); in ptrauth_prctl_reset_keys()
39 get_random_bytes(&keys->apib, sizeof(keys->apib)); in ptrauth_prctl_reset_keys()
41 get_random_bytes(&keys->apda, sizeof(keys->apda)); in ptrauth_prctl_reset_keys()
43 get_random_bytes(&keys->apdb, sizeof(keys->apdb)); in ptrauth_prctl_reset_keys()
45 get_random_bytes(&keys->apga, sizeof(keys->apga)); in ptrauth_prctl_reset_keys()
46 ptrauth_keys_install_user(keys); in ptrauth_prctl_reset_keys()
67 int ptrauth_set_enabled_keys(struct task_struct *tsk, unsigned long keys, in ptrauth_set_enabled_keys() argument
78 if ((keys & ~PR_PAC_ENABLED_KEYS_MASK) || (enabled & ~keys)) in ptrauth_set_enabled_keys()
[all …]
/linux/lib/
H A Dtest_static_keys.c3 * Kernel module for testing static keys.
14 /* old keys */
55 static void invert_keys(struct test_key *keys, int size) in invert_keys() argument
61 if (previous != keys[i].key) { in invert_keys()
62 invert_key(keys[i].key); in invert_keys()
63 previous = keys[i].key; in invert_keys()
68 static int verify_keys(struct test_key *keys, int size, bool invert) in verify_keys() argument
74 ret = static_key_enabled(keys[i].key); in verify_keys()
75 init = keys[i].init_state; in verify_keys()
78 ret = keys[i].test_key(); in verify_keys()
[all …]
/linux/drivers/md/bcache/
H A Dbtree.c18 * as keys are inserted we only sort the pages that have not yet been written.
53 * Check for bad keys in replay
115 if (b->level && b->keys.nsets) in bch_btree_init_next()
116 bch_btree_sort(&b->keys, &b->c->sort); in bch_btree_init_next()
118 bch_btree_sort_lazy(&b->keys, &b->c->sort); in bch_btree_init_next()
121 bch_bset_init_next(&b->keys, write_block(b), in bch_btree_init_next()
164 iter->b = &b->keys; in bch_btree_node_read_done()
171 b->written < btree_blocks(b) && i->seq == b->keys.set[0].data->seq; in bch_btree_node_read_done()
199 if (i != b->keys.set[0].data && !i->keys) in bch_btree_node_read_done()
209 bset_sector_offset(&b->keys, i) < KEY_SIZE(&b->key); in bch_btree_node_read_done()
[all …]
H A Ddebug.c44 sorted = b->c->verify_data->keys.set->data; in bch_btree_verify()
45 inmemory = b->keys.set->data; in bch_btree_verify()
50 v->keys.ops = b->keys.ops; in bch_btree_verify()
65 sorted = v->keys.set->data; in bch_btree_verify()
67 if (inmemory->keys != sorted->keys || in bch_btree_verify()
78 bch_dump_bset(&b->keys, inmemory, 0); in bch_btree_verify()
81 bch_dump_bset(&v->keys, sorted, 0); in bch_btree_verify()
88 bch_dump_bset(&b->keys, i, block); in bch_btree_verify()
94 for (j = 0; j < inmemory->keys; j++) in bch_btree_verify()
163 struct keybuf keys; member
[all …]
/linux/drivers/net/ethernet/cisco/enic/
H A Denic_clsf.c15 * @keys: flow_keys of ipv4 5tuple
21 int enic_addfltr_5t(struct enic *enic, struct flow_keys *keys, u16 rq) in enic_addfltr_5t() argument
26 switch (keys->basic.ip_proto) { in enic_addfltr_5t()
38 data.u.ipv4.src_addr = ntohl(keys->addrs.v4addrs.src); in enic_addfltr_5t()
39 data.u.ipv4.dst_addr = ntohl(keys->addrs.v4addrs.dst); in enic_addfltr_5t()
40 data.u.ipv4.src_port = ntohs(keys->ports.src); in enic_addfltr_5t()
41 data.u.ipv4.dst_port = ntohs(keys->ports.dst); in enic_addfltr_5t()
162 if (tpos->keys.addrs.v4addrs.src == k->addrs.v4addrs.src && in htbl_key_search()
163 tpos->keys.addrs.v4addrs.dst == k->addrs.v4addrs.dst && in htbl_key_search()
164 tpos->keys.ports.ports == k->ports.ports && in htbl_key_search()
[all …]
/linux/tools/testing/selftests/net/tcp_ao/
H A Dkey-management.c240 try_delete_key("closed socket, delete all keys", sk, 100, 100, 0, -1, -1, 0); in check_closed_socket()
245 test_error("failed to set current/rnext keys"); in check_closed_socket()
265 test_error("failed to set current/rnext keys"); in check_closed_socket()
286 test_xfail("%s: the socket has current/rnext keys: %d:%d", in assert_no_current_rnext()
291 test_ok("%s: the socket has no current/rnext keys", tst_msg); in assert_no_current_rnext()
326 try_delete_key("listen socket, delete all keys", sk, 100, 100, 0, -1, -1, 0); in check_listen_socket()
344 test_error("failed to set current/rnext keys"); in check_listen_socket()
347 assert_no_current_rnext("listen() after current/rnext keys set", sk); in check_listen_socket()
427 struct test_key *keys; member
454 struct test_key *key = &collection.keys[index]; in init_key_in_collection()
[all …]
/linux/drivers/md/dm-vdo/indexer/
H A Dradix-sort.c17 * keys to be sorted.
23 /* Sort keys are pointers to immutable fixed-length arrays of bytes. */
27 * The keys are separated into piles based on the byte in each keys at the current offset, so the
28 * number of keys with each byte must be counted.
52 /* The number of bytes remaining in the sort keys. */
65 /* Compare a segment of two fixed-length keys starting at an offset. */
71 /* Insert the next unsorted key into an array of sorted keys. */
88 * 256-way radix sort when the number of keys to sort is small.
118 * Count the number of times each byte value appears in the arrays of keys to sort at the current
157 * After the keys are moved to the appropriate pile, we'll need to sort each of the piles by the
[all …]
/linux/security/keys/
H A Dgc.c10 #include <keys/keyring-type.h>
19 * Reaper for unused keys.
25 * Reaper for links from keyrings to dead keys.
93 * reaper to go through a cycle finding expired keys.
103 * Reap keys of dead type.
106 * collector: the first to mark keys of that type as being dead, the second to
107 * collect dead links and the third to clean up the dead keys. We have to be
133 * Garbage collect a list of unreferenced, detached keys
135 static noinline void key_gc_unused_keys(struct list_head *keys) in key_gc_unused_keys() argument
137 while (!list_empty(keys)) { in key_gc_unused_keys()
[all …]
/linux/Documentation/security/keys/
H A Dcore.rst5 This service allows cryptographic keys, authentication tokens, cross-domain
10 other keys. Processes each have three standard keyring subscriptions that a
11 kernel service can search for relevant keys.
25 In this context, keys represent units of cryptographic data, authentication
47 kernel by a kernel service (such as a filesystem) before keys of that type
53 Should a type be removed from the system, all the keys of that type will
65 instantiation function. Keys can also be immortal.
68 actual "key". In the case of a keyring, this is a list of keys to which
86 Keys being requested from userspace will be in this state.
96 * Expired. Keys can have lifetimes set. If their lifetime is exceeded,
[all …]
/linux/net/core/
H A Dflow_dissector.c1042 * @flow_dissector: list of keys to dissect
1051 * The function will try to retrieve individual keys into target specified
1767 static inline void __flow_hash_consistentify(struct flow_keys *keys) in __flow_hash_consistentify() argument
1771 switch (keys->control.addr_type) { in __flow_hash_consistentify()
1773 if ((__force u32)keys->addrs.v4addrs.dst < in __flow_hash_consistentify()
1774 (__force u32)keys->addrs.v4addrs.src) in __flow_hash_consistentify()
1775 swap(keys->addrs.v4addrs.src, keys->addrs.v4addrs.dst); in __flow_hash_consistentify()
1777 if ((__force u16)keys->ports.dst < in __flow_hash_consistentify()
1778 (__force u16)keys->ports.src) { in __flow_hash_consistentify()
1779 swap(keys->ports.src, keys->ports.dst); in __flow_hash_consistentify()
[all …]
/linux/drivers/mfd/
H A Ducb1x00-assabet.c41 struct gpio_keys_platform_data keys; in ucb1x00_assabet_add() local
46 memset(&keys, 0, sizeof(keys)); in ucb1x00_assabet_add()
55 keys.buttons = buttons; in ucb1x00_assabet_add()
56 keys.nbuttons = ARRAY_SIZE(buttons); in ucb1x00_assabet_add()
57 keys.poll_interval = 50; in ucb1x00_assabet_add()
58 keys.name = "ucb1x00"; in ucb1x00_assabet_add()
60 pdev = platform_device_register_data(&ucb->dev, "gpio-keys", -1, in ucb1x00_assabet_add()
61 &keys, sizeof(keys)); in ucb1x00_assabet_add()
/linux/tools/testing/selftests/tc-testing/tc-tests/filters/
H A Dflow.json18 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst and 0x000000ff …
40 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst.*or 0x000000ff …
62 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst xor 0x000000ff …
84 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst rshift 31 basec…
106 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst addend 0xff bas…
128 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys src addend 0xff bas…
150 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys proto addend 0xff b…
172 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys proto-src addend 0x…
194 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys proto-dst addend 0x…
216 … "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys iif addend 0xff bas…
[all …]
/linux/include/trace/events/
H A Dbcache.h225 TP_PROTO(struct bio *bio, u32 keys),
226 TP_ARGS(bio, keys),
240 __entry->nr_keys = keys;
244 TP_printk("%d,%d %s %llu + %u keys %u",
269 __field(unsigned, keys )
275 __entry->keys = b->keys.set[b->keys.nsets].data->keys;
279 __entry->bucket, __entry->block, __entry->keys)
366 TP_PROTO(struct btree *b, unsigned keys),
367 TP_ARGS(b, keys),
371 __field(unsigned, keys )
[all …]
/linux/drivers/md/persistent-data/
H A Ddm-btree.c43 /* makes the assumption that no two keys are the same. */
50 uint64_t mid_key = le64_to_cpu(n->keys[mid]); in bsearch()
104 array_insert(node->keys, sizeof(*node->keys), nr_entries, index, &key_le); in insert_at()
367 *result_key = le64_to_cpu(ro_node(s)->keys[i]); in btree_lookup_raw()
375 uint64_t *keys, void *value_le) in dm_btree_lookup() argument
397 r = btree_lookup_raw(&spine, root, keys[level], in dm_btree_lookup()
402 if (rkey != keys[level]) { in dm_btree_lookup()
462 *rkey = le64_to_cpu(n->keys[i]); in dm_btree_lookup_next_single()
471 uint64_t *keys, uint64_t *rkey, void *value_le) in dm_btree_lookup_next() argument
480 r = btree_lookup_raw(&spine, root, keys[level], in dm_btree_lookup_next()
[all …]
/linux/certs/
H A Dsystem_keyring.c2 /* System trusted keyring for trusted public keys
16 #include <keys/asymmetric-type.h>
17 #include <keys/system_keyring.h>
40 * @restriction_key: A ring of keys that can be used to vouch for the new cert.
42 * Restrict the addition of keys into a keyring based on the key-to-be-added
59 * @restriction_key: A ring of keys that can be used to vouch for the new cert.
61 * Restrict the addition of keys into a keyring based on the key-to-be-added
81 * @restrict_key: A ring of keys that can be used to vouch for the new cert.
83 * Restrict the addition of keys into a keyring based on the key-to-be-added
111 * @restrict_key: A ring of keys that can be used to vouch for the new cert.
[all …]
/linux/security/integrity/ima/
H A Dima_queue_keys.c8 * Enables deferred processing of keys
13 #include <keys/asymmetric-type.h>
23 * To synchronize access to the list of keys that need to be measured
29 * If custom IMA policy is not loaded then keys queued up
39 * This worker function frees keys that may still be
49 * This function sets up a worker to free queued keys in case
128 * ima_process_queued_keys() - process keys queued for measurement
130 * This function sets ima_process_keys to true and processes queued keys.
131 * From here on keys will be processed right away (not queued).
145 * process the queued keys. in ima_process_queued_keys()
/linux/tools/testing/selftests/ftrace/test.d/trigger/inter-event/
H A Dtrigger-inter-event-combined-hist.tc20 echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' > events/sched/sched_waking/trigger
21 echo 'hist:keys=pid:waking_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).waking_laten…
22 echo 'hist:keys=pid,lat:sort=pid,lat' > events/synthetic/waking_latency/trigger
25 echo 'hist:keys=pid:ts1=common_timestamp.usecs if comm=="ping"' >> events/sched/sched_wakeup/trigger
26 echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts1:onmatch(sched.sched_wakeup).wakeup_…
29 echo 'hist:keys=pid,lat:sort=pid,lat:ww_lat=$waking_lat+$wakeup_lat:onmatch(synthetic.wakeup_latenc…
30 echo 'hist:keys=pid,lat:sort=pid,lat' >> events/synthetic/waking_plus_wakeup_latency/trigger

12345678910>>...71