Home
last modified time | relevance | path

Searched full:key (Results 1 – 25 of 3666) sorted by relevance

12345678910>>...147

/linux/include/linux/platform_data/
H A Dkeyboard-spear.h20 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/security/keys/
H A Dkey.c2 /* Basic authentication token and access key management
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()
41 key, key->magic, KEY_DEBUG_MAGIC); in __key_check()
47 * Get the key quota record for a user, allocating a new record if one doesn't
[all …]
H A Drequest_key.c2 /* Request a key from userspace
7 * See Documentation/security/keys/request-key.rst
20 #define key_negative_timeout 60 /* default timeout on a negative key's existence */
22 static struct key *check_cached_key(struct keyring_search_context *ctx) in check_cached_key()
25 struct key *key = current->cached_requested_key; in check_cached_key() local
27 if (key && in check_cached_key()
28 ctx->match_data.cmp(key, &ctx->match_data) && in check_cached_key()
29 !(key->flags & ((1 << KEY_FLAG_INVALIDATED) | in check_cached_key()
31 return key_get(key); in check_cached_key()
36 static void cache_requested_key(struct key *key) in cache_requested_key() argument
[all …]
H A Dgc.c2 /* Key garbage collector
14 * Delay between key revocation/expiry in seconds
34 #define KEY_GC_KEY_EXPIRED 0 /* A key expired and needs unlinking */
40 * Any key whose type gets unregistered will be re-typed to this if it can't be
70 * Set the expiration time on a key.
72 void key_set_expiry(struct key *key, time64_t expiry) in key_set_expiry() argument
74 key->expiry = expiry; in key_set_expiry()
76 if (!(key->type->flags & KEY_TYPE_INSTANT_REAP)) in key_set_expiry()
92 * Some key's cleanup time was met after it expired, so we need to get the
138 struct key *key = in key_gc_unused_keys() local
[all …]
H A Dkeyring.c25 * When plumbing the depths of the key tree, this sets a hard limit
40 static inline struct key *keyring_ptr_to_key(const struct assoc_array_ptr *x) in keyring_ptr_to_key()
43 return (struct key *)((unsigned long)object & ~KEYRING_PTR_SUBTYPE); in keyring_ptr_to_key()
45 static inline void *keyring_key_to_ptr(struct key *key) in keyring_key_to_ptr() argument
47 if (key->type == &key_type_keyring) in keyring_key_to_ptr()
48 return (void *)((unsigned long)key | KEYRING_PTR_SUBTYPE); in keyring_key_to_ptr()
49 return key; in keyring_key_to_ptr()
70 * The keyring key type definition. Keyrings are simply keys of this type and
76 static int keyring_instantiate(struct key *keyring,
78 static void keyring_revoke(struct key *keyring);
[all …]
H A Dkeyctl.c2 /* Userspace key control operations
13 #include <linux/key.h>
63 * Extract the description of a new key from userspace and either add it as a
64 * new key to the specified keyring or update a matching key in that keyring.
66 * If the description is NULL or an empty string, the key type is asked to
69 * The keyring must be writable so that we can attach the key to it.
71 * If successful, the new key's serial number is returned, otherwise an error
132 /* create or update the requested key and add it to the target in SYSCALL_DEFINE5()
156 * matching key. Keyrings must have appropriate Search permission to be
159 * If a key is found, it will be attached to the destination keyring if there's
[all …]
/linux/tools/testing/selftests/bpf/
H A Dtest_lru_map.c42 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()
103 printf("key:%llu not found from map. %s(%d)\n", in map_subset()
108 printf("key:%llu value0:%llu != value1:%llu\n", in map_subset()
142 * Add key=1 (+1 key)
143 * Add key=2 (+1 key)
144 * Lookup Key=1
145 * Add Key
150 unsigned long long key, value[nr_cpus]; test_lru_sanity0() local
241 unsigned long long key, end_key, value[nr_cpus]; test_lru_sanity1() local
317 unsigned long long key, value[nr_cpus]; test_lru_sanity2() local
424 unsigned long long key, end_key, value[nr_cpus]; test_lru_sanity3() local
489 unsigned long long key, value[nr_cpus]; test_lru_sanity4() local
547 unsigned long long key, value[nr_cpus]; do_test_lru_sanity5() local
564 unsigned long long key, value[nr_cpus]; test_lru_sanity5() local
612 unsigned long long key, value[nr_cpus]; test_lru_sanity6() local
678 unsigned long long key, value[nr_cpus]; test_lru_sanity7() local
769 unsigned long long key, value[nr_cpus]; test_lru_sanity8() local
[all...]
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_tunnel_kern.c53 __type(key, __u32); in gre_set_tunnel()
61 struct bpf_tunnel_key key; in gre_set_tunnel()
63 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
64 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel()
65 key.tunnel_id = 2; in gre_set_tunnel()
66 key.tunnel_tos = 0;
67 key.tunnel_ttl = 64;
69 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel_no_key()
49 struct bpf_tunnel_key key; gre_set_tunnel() local
71 struct bpf_tunnel_key key; gre_set_tunnel_no_key() local
92 struct bpf_tunnel_key key; gre_get_tunnel() local
107 struct bpf_tunnel_key key; ip6gretap_set_tunnel() local
131 struct bpf_tunnel_key key; ip6gretap_get_tunnel() local
150 struct bpf_tunnel_key key; erspan_set_tunnel() local
193 struct bpf_tunnel_key key; erspan_get_tunnel() local
229 struct bpf_tunnel_key key; ip4ip6erspan_set_tunnel() local
273 struct bpf_tunnel_key key; ip4ip6erspan_get_tunnel() local
310 struct bpf_tunnel_key key; vxlan_set_tunnel_dst() local
349 struct bpf_tunnel_key key; vxlan_set_tunnel_src() local
389 struct bpf_tunnel_key key; vxlan_get_tunnel_src() local
475 struct bpf_tunnel_key key; ip6vxlan_set_tunnel_dst() local
506 struct bpf_tunnel_key key; ip6vxlan_set_tunnel_src() local
537 struct bpf_tunnel_key key; ip6vxlan_get_tunnel_src() local
579 struct bpf_tunnel_key key; geneve_set_tunnel() local
618 struct bpf_tunnel_key key; geneve_get_tunnel() local
639 struct bpf_tunnel_key key; ip6geneve_set_tunnel() local
678 struct bpf_tunnel_key key; ip6geneve_get_tunnel() local
702 struct bpf_tunnel_key key = {}; ipip_set_tunnel() local
732 struct bpf_tunnel_key key; ipip_get_tunnel() local
747 struct bpf_tunnel_key key = {}; ipip_gue_set_tunnel() local
784 struct bpf_tunnel_key key = {}; ipip_fou_set_tunnel() local
822 struct bpf_tunnel_key key = {}; ipip_encap_get_tunnel() local
849 struct bpf_tunnel_key key = {}; ipip6_set_tunnel() local
881 struct bpf_tunnel_key key; ipip6_get_tunnel() local
898 struct bpf_tunnel_key key = {}; ip6ip6_set_tunnel() local
929 struct bpf_tunnel_key key; ip6ip6_get_tunnel() local
[all...]
/linux/drivers/net/wireless/silabs/wfx/
H A Dkey.c3 * Key management related functions.
11 #include "key.h"
29 WARN(!(wdev->key_map & BIT(idx)), "inconsistent key allocation"); in wfx_free_key()
34 struct ieee80211_key_conf *key, u8 *peer_addr) in fill_wep_pair() argument
36 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_pair()
37 msg->key_length = key->keylen; in fill_wep_pair()
38 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_pair()
44 struct ieee80211_key_conf *key) in fill_wep_group() argument
46 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_group()
47 msg->key_id = key->keyidx; in fill_wep_group()
[all …]
/linux/fs/ubifs/
H A Dkey.h12 * 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
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.
85 * ino_key_init - initialize inode key.
87 * @key: key to initialize
91 union ubifs_key *key, ino_t inum) in ino_key_init() argument
[all …]
/linux/net/mac80211/
H A Dkey.c32 * DOC: Key handling basics
34 * Key handling in mac80211 is done based on per-interface (sub_if_data)
36 * each station key also belongs to that interface.
39 * that are implemented in software, for each key the hardware is asked
40 * to enable that key for offloading but if it cannot do that the key is
43 * There is currently no way of knowing whether a key is handled in SW
46 * All key management is internally protected by a mutex. Within all
47 * other parts of mac80211, key references are, just as STA structure
49 * unprotected, namely the key->sta dereferences within the hardware
51 * remove the key which waits for an RCU grace period.
[all …]
/linux/Documentation/security/keys/
H A Dcore.rst2 Kernel Key Retention Service
9 Keyrings are permitted; these are a special type of key that can hold links to
13 The key service can be configured on by enabling:
15 "Security options"/"Enable access key retention support" (CONFIG_KEYS)
22 Key Overview
26 tokens, keyrings, etc.. These are represented in the kernel by struct key.
28 Each key has a number of attributes:
32 - A description (for matching a key in a search).
39 * Each key is issued a serial number of type key_serial_t that is unique for
40 the lifetime of that key. All serial numbers are positive non-zero 32-bit
[all …]
H A Drequest-key.rst2 Key Request Service
5 The key request service is part of the key retention service (refer to
12 struct key *request_key(const struct key_type *type,
18 struct key *request_key_tag(const struct key_type *type,
25 struct key *request_key_with_auxdata(const struct key_type *type,
34 struct key *request_key_rcu(const struct key_type *type,
46 does not need to link the key to a keyring to prevent it from being immediately
47 destroyed. The kernel interface returns a pointer directly to the key, and
48 it's up to the caller to destroy the key.
56 NULL). This is only useful for those key types that define their own upcall
[all …]
/linux/arch/x86/crypto/
H A Daesni-intel_asm.S32 #define KEY %xmm2 macro
147 movups (UKEYP), %xmm0 # user key (first 16 bytes)
149 lea 0x10(KEYP), TKEYP # key addr
155 movups 0x10(UKEYP), %xmm2 # other user key
186 movq 0x10(UKEYP), %xmm2 # other user key
261 movl 480(KEYP), KLEN # key length
276 * KEYP: key struct pointer
282 * KEY
286 movaps (KEYP), KEY # key
288 pxor KEY, STATE # round 0
[all …]
/linux/crypto/
H A Drsa_helper.c3 * RSA key extract helper
19 struct rsa_key *key = context; in rsa_get_n() local
23 /* invalid key provided */ in rsa_get_n()
33 /* In FIPS mode only allow key size 2K and higher */ in rsa_get_n()
35 pr_err("RSA: key size not allowed in FIPS mode\n"); in rsa_get_n()
40 key->n = value; in rsa_get_n()
41 key->n_sz = vlen; in rsa_get_n()
49 struct rsa_key *key = context; in rsa_get_e() local
51 /* invalid key provided */ in rsa_get_e()
52 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_e()
[all …]
/linux/kernel/
H A Djump_label.c41 * Entrires are sorted by key. in jump_label_cmp()
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()
117 * static_key_fast_inc_not_disabled - adds a user for a static key
118 * @key: static key that must be already enabled
120 * The caller must make sure that the static key can't get disabled while
122 * an already enabled static key.
[all …]
/linux/net/openvswitch/
H A Dflow.c385 static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key) in parse_ipv6hdr() argument
400 get_ipv6_ext_hdrs(skb, nh, &key->ipv6.exthdrs); in parse_ipv6hdr()
402 key->ip.proto = NEXTHDR_NONE; in parse_ipv6hdr()
403 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
404 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
405 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); in parse_ipv6hdr()
406 key->ipv6.addr.src = nh->saddr; in parse_ipv6hdr()
407 key->ipv6.addr.dst = nh->daddr; in parse_ipv6hdr()
412 key->ip.frag = OVS_FRAG_TYPE_LATER; in parse_ipv6hdr()
413 key->ip.proto = NEXTHDR_FRAGMENT; in parse_ipv6hdr()
[all …]
/linux/Documentation/crypto/
H A Dasymmetric-keys.rst4 Asymmetric / Public-key Cryptography Key Type
10 - Key identification.
13 - Asymmetric key subtypes.
21 The "asymmetric" key type is designed to be a container for the keys used in
22 public-key cryptography, without imposing any particular restrictions on the
23 form or mechanism of the cryptography or form of the key.
25 The asymmetric key is given a subtype that defines what sort of data is
26 associated with the key and provides operations to describe and destroy it.
27 However, no requirement is made that the key data actually be stored in the
28 key.
[all …]
/linux/drivers/s390/crypto/
H A Dzcrypt_cca_key.h21 * mapping for the cca private ME key token.
25 * mapping for the cca key token header
40 * In a private key, the modulus doesn't appear in the public
51 unsigned short modulus_byte_len; /* In a private key, this is 0 */
55 * mapping for the cca private CRT key 'token'
92 * Set up private key fields of a type6 MEX message.
95 * @p: pointer to memory area for the key
97 * Returns the size of the key area or negative errno value.
112 } __packed *key = p; in zcrypt_type6_mex_key_en() local
124 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_en()
[all …]
H A Dzcrypt_ccamisc.h16 /* 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 */
32 /* header part of a CCA key toke
50 u8 key[32]; /* key value (encrypted) */ global() member
[all...]
/linux/drivers/nvdimm/
H A Dsecurity.c11 #include <linux/key.h>
12 #include <linux/key-type.h>
23 MODULE_PARM_DESC(key_revalidate, "Require key validation at init.");
27 static void *key_data(struct key *key) in key_data() argument
29 struct encrypted_key_payload *epayload = dereference_key_locked(key); in key_data()
31 lockdep_assert_held_read(&key->sem); in key_data()
36 static void nvdimm_put_key(struct key *key) in nvdimm_put_key() argument
38 if (!key) in nvdimm_put_key()
41 up_read(&key->sem); in nvdimm_put_key()
42 key_put(key); in nvdimm_put_key()
[all …]
/linux/net/ceph/
H A Dcrypto.c11 #include <linux/key-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()
40 if (!key->len) in set_secret()
43 key->key = kmemdup(buf, key->len, GFP_NOIO); in set_secret()
44 if (!key->key) { in set_secret()
51 key->tfm = crypto_alloc_sync_skcipher("cbc(aes)", 0, 0); in set_secret()
[all …]
/linux/include/linux/
H A Dkey-type.h2 /* Definitions for key type implementations
11 #include <linux/key.h>
20 * Pre-parsed payload, used by key add, update and instantiate.
24 * def_datalen from the key type. Then if the preparse() op is provided by the
25 * key type, that will be called. Then the struct will be passed to the
33 char *description; /* Proposed key description (or NULL) */
38 time64_t expiry; /* Expiry time of key */
41 typedef int (*request_key_actor_t)(struct key *auth_key, void *aux);
51 bool (*cmp)(const struct key *key,
62 * kernel managed key type definition
[all …]
/linux/fs/nilfs2/
H A Ddirect.c24 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()
42 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup()
51 __u64 key, __u64 *ptrp, in nilfs_direct_lookup_contig() argument
59 if (key > NILFS_DIRECT_KEY_MAX) in nilfs_direct_lookup_contig()
61 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup_contig()
[all …]
/linux/drivers/input/keyboard/
H A Dpinephone-keyboard.c46 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),
52 KEY(0, 6, KEY_6),
53 KEY(0, 7, KEY_7),
54 KEY(0, 8, KEY_8),
55 KEY(0, 9, KEY_9),
[all …]

12345678910>>...147