/linux-6.12.1/tools/testing/selftests/bpf/ |
D | test_lru_map.c | 1 // SPDX-License-Identifier: GPL-2.0-only 36 if (map_fd == -1) in create_map() 42 static int bpf_map_lookup_elem_with_ref_bit(int fd, unsigned long long key, in bpf_map_lookup_elem_with_ref_bit() argument 48 BPF_LD_IMM64(BPF_REG_3, key), in bpf_map_lookup_elem_with_ref_bit() 50 BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), in bpf_map_lookup_elem_with_ref_bit() 57 BPF_JMP_IMM(BPF_JA, 0, 0, 1), in bpf_map_lookup_elem_with_ref_bit() 58 BPF_MOV64_IMM(BPF_REG_0, 1), in bpf_map_lookup_elem_with_ref_bit() 66 .repeat = 1, in bpf_map_lookup_elem_with_ref_bit() 69 mfd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, sizeof(int), sizeof(__u64), 1, NULL); in bpf_map_lookup_elem_with_ref_bit() 71 return -1; in bpf_map_lookup_elem_with_ref_bit() [all …]
|
D | test_maps.c | 1 // SPDX-License-Identifier: GPL-2.0-only 39 long long key, next_key, first_key, value; in test_hashmap() local 42 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value), 2, &map_opts); in test_hashmap() 45 exit(1); in test_hashmap() 48 key = 1; in test_hashmap() 50 /* Insert key=1 element. */ in test_hashmap() 51 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap() 55 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap() 56 /* key=1 already exists. */ in test_hashmap() 59 /* -1 is an invalid flag. */ in test_hashmap() [all …]
|
D | test_lpm_map.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Randomized tests for eBPF longest-prefix-match maps 5 * This program runs randomized tests against the lpm-bpf-map. It implements a 9 * Based on tlpm, this inserts randomized data into bpf-lpm-maps and verifies 10 * the trie-based bpf-map implementation behaves the same way as tlpm. 33 uint8_t key[]; member 37 const uint8_t *key, 41 const uint8_t *key, in tlpm_add() argument 50 node = tlpm_match(list, key, n_bits); in tlpm_add() 51 if (node && node->n_bits == n_bits) { in tlpm_add() [all …]
|
/linux-6.12.1/fs/ubifs/ |
D | key.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (C) 2006-2008 Nokia Corporation. 12 * This header contains various key-related definitions and helper function. 13 * UBIFS allows several key schemes, so we access key fields only via these 14 * helpers. At the moment only one key scheme is supported. 16 * Simple key scheme 19 * Keys are 64-bits long. First 32-bits are inode number (parent inode number 20 * in case of direntry key). Next 3 bits are node type. The last 29 bits are 26 * Lot's of the key helpers require a struct ubifs_info *c as the first parameter. 28 * different c->key_format. But right now, there is only one key type, UBIFS_SIMPLE_KEY_FMT. [all …]
|
D | tnc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2006-2008 Nokia Corporation. 13 * the UBIFS B-tree. 27 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key, 42 NAME_MATCHES = 1, 53 p = &c->old_idx.rb_node; in do_insert_old_idx() 57 if (old_idx->lnum < o->lnum) in do_insert_old_idx() 58 p = &(*p)->rb_left; in do_insert_old_idx() 59 else if (old_idx->lnum > o->lnum) in do_insert_old_idx() 60 p = &(*p)->rb_right; in do_insert_old_idx() [all …]
|
/linux-6.12.1/include/linux/platform_data/ |
D | keyboard-spear.h | 20 KEY(0, 0, KEY_ESC), \ 21 KEY(0, 1, KEY_1), \ 22 KEY(0, 2, KEY_2), \ 23 KEY(0, 3, KEY_3), \ 24 KEY(0, 4, KEY_4), \ 25 KEY(0, 5, KEY_5), \ 26 KEY(0, 6, KEY_6), \ 27 KEY(0, 7, KEY_7), \ 28 KEY(0, 8, KEY_8), \ 29 KEY(1, 0, KEY_9), \ [all …]
|
/linux-6.12.1/lib/ |
D | hashtable_test.c | 1 // SPDX-License-Identifier: GPL-2.0 13 int key; member 37 DEFINE_HASHTABLE(hash, 1); in hashtable_test_hash_empty() 41 a.key = 1; in hashtable_test_hash_empty() 43 hash_add(hash, &a.node, a.key); in hashtable_test_hash_empty() 54 a.key = 1; in hashtable_test_hash_hashed() 56 hash_add(hash, &a.node, a.key); in hashtable_test_hash_hashed() 57 b.key = 1; in hashtable_test_hash_hashed() 59 hash_add(hash, &b.node, b.key); in hashtable_test_hash_hashed() 71 a.key = 1; in hashtable_test_hash_add() [all …]
|
/linux-6.12.1/kernel/ |
D | jump_label.c | 1 // SPDX-License-Identifier: GPL-2.0-only 41 * Entrires are sorted by key. in jump_label_cmp() 44 return -1; in jump_label_cmp() 47 return 1; in jump_label_cmp() 55 return -1; in jump_label_cmp() 58 return 1; in jump_label_cmp() 65 long delta = (unsigned long)a - (unsigned long)b; in jump_label_swap() 70 jea->code = jeb->code - delta; in jump_label_swap() 71 jea->target = jeb->target - delta; in jump_label_swap() 72 jea->key = jeb->key - delta; in jump_label_swap() [all …]
|
/linux-6.12.1/include/linux/ |
D | jump_label.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 8 * Copyright (C) 2009-2012 Jason Baron <jbaron@redhat.com> 9 * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra 23 * DEFINE_STATIC_KEY_TRUE(key); 24 * DEFINE_STATIC_KEY_FALSE(key); 31 * self-modifying code. Assuming toolchain and architecture support, if we 32 * define a "key" that is initially false via "DEFINE_STATIC_KEY_FALSE(key)", 33 * an "if (static_branch_unlikely(&key))" statement is an unconditional branch 34 * (which defaults to false - and the true block is placed out of line). 35 * Similarly, we can define an initially true key via [all …]
|
/linux-6.12.1/drivers/input/keyboard/ |
D | pinephone-keyboard.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org> 18 #define DRV_NAME "pinephone-keyboard" 43 #define PPKB_BUF_LEN (1 + PPKB_COLS) 46 KEY(0, 0, KEY_ESC), 47 KEY(0, 1, KEY_1), 48 KEY(0, 2, KEY_2), 49 KEY(0, 3, KEY_3), 50 KEY(0, 4, KEY_4), 51 KEY(0, 5, KEY_5), [all …]
|
/linux-6.12.1/drivers/s390/crypto/ |
D | zcrypt_ccamisc.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 16 /* Key token types */ 17 #define TOKTYPE_NON_CCA 0x00 /* Non-CCA key token */ 18 #define TOKTYPE_CCA_INTERNAL 0x01 /* CCA internal sym key token */ 19 #define TOKTYPE_CCA_INTERNAL_PKA 0x1f /* CCA internal asym key token */ 22 #define TOKVER_PROTECTED_KEY 0x01 /* Protected key token */ 23 #define TOKVER_CLEAR_KEY 0x02 /* Clear key token */ 26 #define TOKVER_CCA_AES 0x04 /* CCA AES key token */ 27 #define TOKVER_CCA_VLSC 0x05 /* var length sym cipher key token */ 29 /* Max size of a cca variable length cipher key token */ [all …]
|
/linux-6.12.1/tools/testing/selftests/net/tcp_ao/ |
D | key-management.c | 1 // SPDX-License-Identifier: GPL-2.0 23 err = add_vrf("ksft-vrf", test_vrf_tabid, test_vrf_ifindex, -1); in setup_vrfs() 27 err = link_set_up("ksft-vrf"); in setup_vrfs() 70 struct tcp_ao_getsockopt key = {}; in test_del_key() local 81 del.set_current = 1; in test_del_key() 85 del.set_rnext = 1; in test_del_key() 91 return -errno; in test_del_key() 97 err = test_get_one_ao(sk, &key, &sockaddr, sizeof(sockaddr), in test_del_key() 100 return -EEXIST; in test_del_key() 101 if (err != -E2BIG) in test_del_key() [all …]
|
/linux-6.12.1/net/ceph/ |
D | crypto.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/key-type.h> 14 #include <keys/ceph-type.h> 15 #include <keys/user-type.h> 20 * Set ->key and ->tfm. The rest of the key should be filled in before 23 static int set_secret(struct ceph_crypto_key *key, void *buf) in set_secret() argument 28 key->key = NULL; in set_secret() 29 key->tfm = NULL; in set_secret() 31 switch (key->type) { in set_secret() 37 return -ENOTSUPP; in set_secret() [all …]
|
/linux-6.12.1/fs/btrfs/ |
D | free-space-tree.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "disk-io.h" 12 #include "free-space-tree.h" 14 #include "block-group.h" 17 #include "extent-tree.h" 18 #include "root-tree.h" 27 struct btrfs_key key = { in btrfs_free_space_root() local 33 if (btrfs_fs_incompat(block_group->fs_info, EXTENT_TREE_V2)) in btrfs_free_space_root() 34 key.offset = block_group->global_root_id; in btrfs_free_space_root() 35 return btrfs_global_root(block_group->fs_info, &key); in btrfs_free_space_root() [all …]
|
/linux-6.12.1/net/mac80211/ |
D | key.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright 2002-2005, Instant802 Networks, Inc. 4 * Copyright 2005-2006, Devicescape Software, Inc. 5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 6 * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net> 7 * Copyright 2013-2014 Intel Mobile Communications GmbH 8 * Copyright 2015-2017 Intel Deutschland GmbH 9 * Copyright 2018-2020, 2022-2024 Intel Corporation 23 #include "driver-ops.h" 32 * DOC: Key handling basics [all …]
|
/linux-6.12.1/crypto/asymmetric_keys/ |
D | restrict.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* Instantiate a public key crypto key from an X.509 Certificate 27 return 1; in ca_keys_setup() 31 size_t hexlen = (strlen(str) - 3) / 2; in ca_keys_setup() 36 return 1; in ca_keys_setup() 43 ca_keyid = p; /* owner key 'id:xxxxxx' */ in ca_keys_setup() 48 return 1; in ca_keys_setup() 54 * restrict_link_by_signature - Restrict additions to a ring of public keys 56 * @type: The type of key being added. 57 * @payload: The payload of the new key. [all …]
|
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | lookup_and_delete.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 __u64 key, value = START_VALUE; in fill_values() local 18 for (key = 1; key < MAX_ENTRIES + 1; key++) { in fill_values() 19 err = bpf_map_update_elem(map_fd, &key, &value, BPF_NOEXIST); in fill_values() 21 return -1; in fill_values() 29 __u64 key, value[nr_cpus]; in fill_values_percpu() local 35 for (key = 1; key < MAX_ENTRIES + 1; key++) { in fill_values_percpu() 36 err = bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST); in fill_values_percpu() 38 return -1; in fill_values_percpu() 54 err = bpf_map__set_type(skel->maps.hash_map, map_type); in setup_prog() [all …]
|
D | map_init.c | 1 // SPDX-License-Identifier: GPL-2.0-only 24 map_key_t key; in map_populate() local 29 for (key = 1; key <= num; key++) { in map_populate() 30 err = bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST); in map_populate() 32 return -1; in map_populate() 48 err = bpf_map__set_type(skel->maps.hashmap1, map_type); in setup() 52 err = bpf_map__set_max_entries(skel->maps.hashmap1, map_sz); in setup() 60 *map_fd = bpf_map__fd(skel->maps.hashmap1); in setup() 77 /* executes bpf program that updates map with key, value */ 78 static int prog_run_insert_elem(struct test_map_init *skel, map_key_t key, in prog_run_insert_elem() argument [all …]
|
/linux-6.12.1/security/keys/ |
D | key.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* Basic authentication token and access key management 4 * Copyright (C) 2004-2008 Red Hat, Inc. All Rights Reserved. 26 unsigned int key_quota_root_maxkeys = 1000000; /* root's key count quota */ 27 unsigned int key_quota_root_maxbytes = 25000000; /* root's key space quota */ 28 unsigned int key_quota_maxkeys = 200; /* general key count quota */ 29 unsigned int key_quota_maxbytes = 20000; /* general key space quota */ 34 /* We serialise key instantiation and link */ 38 void __key_check(const struct key *key) in __key_check() argument 40 printk("__key_check: key %p {%08x} should be {%08x}\n", in __key_check() [all …]
|
/linux-6.12.1/net/ipv4/ |
D | tcp_ao.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * INET An implementation of the TCP Authentication Option (TCP-AO). 23 int tcp_ao_calc_traffic_key(struct tcp_ao_key *mkt, u8 *key, void *ctx, in tcp_ao_calc_traffic_key() argument 29 if (crypto_ahash_setkey(crypto_ahash_reqtfm(hp->req), in tcp_ao_calc_traffic_key() 30 mkt->key, mkt->keylen)) in tcp_ao_calc_traffic_key() 33 ret = crypto_ahash_init(hp->req); in tcp_ao_calc_traffic_key() 38 ahash_request_set_crypt(hp->req, &sg, key, len); in tcp_ao_calc_traffic_key() 39 crypto_ahash_update(hp->req); in tcp_ao_calc_traffic_key() 41 ret = crypto_ahash_final(hp->req); in tcp_ao_calc_traffic_key() 47 memset(key, 0, tcp_ao_digest_size(mkt)); in tcp_ao_calc_traffic_key() [all …]
|
/linux-6.12.1/tools/testing/selftests/bpf/progs/ |
D | wq.c | 1 // SPDX-License-Identifier: GPL-2.0 22 __type(key, int); 30 __type(key, int); 42 __type(key, int); 49 __type(key, int); 56 static int test_elem_callback(void *map, int *key, in test_elem_callback() argument 57 int (callback_fn)(void *map, int *key, void *value)) in test_elem_callback() 62 if ((ok & (1 << *key) || in test_elem_callback() 63 (ok_sleepable & (1 << *key)))) in test_elem_callback() 64 return -22; in test_elem_callback() [all …]
|
/linux-6.12.1/fs/nilfs2/ |
D | direct.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation. 20 ((struct nilfs_direct_node *)direct->b_u.u_data + 1); in nilfs_direct_dptrs() 24 nilfs_direct_get_ptr(const struct nilfs_bmap *direct, __u64 key) in nilfs_direct_get_ptr() argument 26 return le64_to_cpu(*(nilfs_direct_dptrs(direct) + key)); in nilfs_direct_get_ptr() 30 __u64 key, __u64 ptr) in nilfs_direct_set_ptr() argument 32 *(nilfs_direct_dptrs(direct) + key) = cpu_to_le64(ptr); in nilfs_direct_set_ptr() 36 __u64 key, int level, __u64 *ptrp) in nilfs_direct_lookup() argument 40 if (key > NILFS_DIRECT_KEY_MAX || level != 1) in nilfs_direct_lookup() 41 return -ENOENT; in nilfs_direct_lookup() [all …]
|
/linux-6.12.1/tools/testing/selftests/tc-testing/tc-tests/filters/ |
D | flow.json | 4 "name": "Add flow filter with map key and ops", 15 …mdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 protocol ip flow map key dst … 17 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol ip prio 1 flow", 18 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst … 19 "matchCount": "1", 26 "name": "Add flow filter with map key or ops", 37 …mdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 protocol ip flow map key dst … 39 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol ip prio 1 flow", 40 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst.… 41 "matchCount": "1", [all …]
|
/linux-6.12.1/Documentation/crypto/ |
D | asymmetric-keys.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 Asymmetric / Public-key Cryptography Key Type 9 - Overview. 10 - Key identification. 11 - Accessing asymmetric keys. 12 - Signature verification. 13 - Asymmetric key subtypes. 14 - Instantiation data parsers. 15 - Keyring link restrictions. 21 The "asymmetric" key type is designed to be a container for the keys used in [all …]
|
/linux-6.12.1/Documentation/security/keys/ |
D | trusted-encrypted.rst | 5 Trusted and Encrypted Keys are two new key types added to the existing kernel 6 key ring service. Both of these new types are variable length symmetric keys, 28 (1) TPM (Trusted Platform Module: hardware device) 30 Rooted to Storage Root Key (SRK) which never leaves the TPM that 33 (2) TEE (Trusted Execution Environment: OP-TEE based on Arm TrustZone) 35 Rooted to Hardware Unique Key (HUK) which is generally burnt in on-chip 41 mode, trust is rooted to the OTPMK, a never-disclosed 256-bit key 43 Otherwise, a common fixed test key is used instead. 45 (4) DCP (Data Co-Processor: crypto accelerator of various i.MX SoCs) 47 Rooted to a one-time programmable key (OTP) that is generally burnt [all …]
|