Home
last modified time | relevance | path

Searched +full:key +full:- (Results 1 – 25 of 1137) sorted by relevance

12345678910>>...46

/kernel/linux/linux-5.10/security/keys/
Dkey.c1 // 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.
27 unsigned int key_quota_root_maxkeys = 1000000; /* root's key count quota */
28 unsigned int key_quota_root_maxbytes = 25000000; /* root's key space quota */
29 unsigned int key_quota_maxkeys = 200; /* general key count quota */
30 unsigned int key_quota_maxbytes = 20000; /* general key space quota */
35 /* We serialise key instantiation and link */
39 void __key_check(const struct key *key) in __key_check() argument
41 printk("__key_check: key %p {%08x} should be {%08x}\n", in __key_check()
[all …]
Drequest_key.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Request a key from userspace
4 * Copyright (C) 2004-2007 Red Hat, Inc. All Rights Reserved.
7 * See Documentation/security/keys/request-key.rst
18 #include <keys/request_key_auth-type.h>
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()
[all …]
/kernel/linux/linux-6.6/security/keys/
Dkey.c1 // 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.
27 unsigned int key_quota_root_maxkeys = 1000000; /* root's key count quota */
28 unsigned int key_quota_root_maxbytes = 25000000; /* root's key space quota */
29 unsigned int key_quota_maxkeys = 200; /* general key count quota */
30 unsigned int key_quota_maxbytes = 20000; /* general key space quota */
35 /* We serialise key instantiation and link */
39 void __key_check(const struct key *key) in __key_check() argument
41 printk("__key_check: key %p {%08x} should be {%08x}\n", in __key_check()
[all …]
Drequest_key.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Request a key from userspace
4 * Copyright (C) 2004-2007 Red Hat, Inc. All Rights Reserved.
7 * See Documentation/security/keys/request-key.rst
18 #include <keys/request_key_auth-type.h>
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()
[all …]
/kernel/linux/linux-5.10/drivers/staging/wfx/
Dkey.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Key management related functions.
5 * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
6 * Copyright (c) 2010, ST-Ericsson
11 #include "key.h"
19 idx = ffs(~wdev->key_map) - 1; in wfx_alloc_key()
21 return -1; in wfx_alloc_key()
23 wdev->key_map |= BIT(idx); in wfx_alloc_key()
29 WARN(!(wdev->key_map & BIT(idx)), "inconsistent key allocation"); in wfx_free_key()
30 wdev->key_map &= ~BIT(idx); in wfx_free_key()
[all …]
/kernel/linux/linux-6.6/drivers/net/wireless/silabs/wfx/
Dkey.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Key management related functions.
5 * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
6 * Copyright (c) 2010, ST-Ericsson
11 #include "key.h"
19 idx = ffs(~wdev->key_map) - 1; in wfx_alloc_key()
21 return -1; in wfx_alloc_key()
23 wdev->key_map |= BIT(idx); in wfx_alloc_key()
29 WARN(!(wdev->key_map & BIT(idx)), "inconsistent key allocation"); in wfx_free_key()
30 wdev->key_map &= ~BIT(idx); in wfx_free_key()
[all …]
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/
Dtest_lru_map.c1 // 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()
71 return -1; in bpf_map_lookup_elem_with_ref_bit()
78 return -1; in bpf_map_lookup_elem_with_ref_bit()
83 ret = -1; 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()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
Dtest_lru_map.c1 // 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
50 BPF_LD_IMM64(BPF_REG_3, key), in bpf_map_lookup_elem_with_ref_bit()
52 BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), in bpf_map_lookup_elem_with_ref_bit()
75 return -1; in bpf_map_lookup_elem_with_ref_bit()
88 return -1; in bpf_map_lookup_elem_with_ref_bit()
94 ret = -1; in bpf_map_lookup_elem_with_ref_bit()
114 printf("key:%llu not found from map. %s(%d)\n", in map_subset()
119 printf("key:%llu value0:%llu != value1:%llu\n", in map_subset()
[all …]
/kernel/linux/linux-6.6/fs/ubifs/
Dkey.h1 /* 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 …]
/kernel/linux/linux-5.10/fs/ubifs/
Dkey.h1 /* 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 …]
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/
Dtest_tunnel_kern.c1 // SPDX-License-Identifier: GPL-2.0
43 __u8 opt_data[8]; /* hard-coded to 8 byte */
73 __type(key, __u32);
81 struct bpf_tunnel_key key; in gre_set_tunnel() local
83 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
84 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel()
85 key.tunnel_id = 2; in gre_set_tunnel()
86 key.tunnel_tos = 0; in gre_set_tunnel()
87 key.tunnel_ttl = 64; in gre_set_tunnel()
89 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel()
[all …]
/kernel/linux/linux-6.6/net/mac80211/
Dkey.c1 // 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-2023 Intel Corporation
23 #include "driver-ops.h"
32 * DOC: Key handling basics
[all …]
/kernel/linux/linux-5.10/net/mac80211/
Dkey.c1 // 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 Intel Corporation
23 #include "driver-ops.h"
32 * DOC: Key handling basics
[all …]
/kernel/linux/linux-6.6/Documentation/security/keys/
Dcore.rst2 Kernel Key Retention Service
5 This service allows cryptographic keys, authentication tokens, cross-domain
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:
30 - A serial number.
31 - A type.
[all …]
/kernel/linux/linux-5.10/Documentation/security/keys/
Dcore.rst2 Kernel Key Retention Service
5 This service allows cryptographic keys, authentication tokens, cross-domain
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:
30 - A serial number.
31 - A type.
[all …]
/kernel/linux/linux-6.6/crypto/
Drsa_helper.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * RSA key extract helper
19 struct rsa_key *key = context; in rsa_get_n() local
23 /* invalid key provided */ in rsa_get_n()
25 return -EINVAL; in rsa_get_n()
30 n_sz--; 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()
36 return -EINVAL; in rsa_get_n()
40 key->n = value; in rsa_get_n()
[all …]
/kernel/linux/linux-5.10/crypto/
Drsa_helper.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * RSA key extract helper
19 struct rsa_key *key = context; in rsa_get_n() local
23 /* invalid key provided */ in rsa_get_n()
25 return -EINVAL; in rsa_get_n()
30 n_sz--; 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()
36 return -EINVAL; in rsa_get_n()
40 key->n = value; in rsa_get_n()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dkey.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Authentication token and access key management
27 /* key handle serial number */
30 /* key handle permissions mask */
33 struct key;
40 #define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */
41 #define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */
42 #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */
43 #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
44 #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */
[all …]
/kernel/linux/linux-6.6/include/linux/
Dkey.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Authentication token and access key management
27 /* key handle serial number */
30 /* key handle permissions mask */
33 struct key;
40 #define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */
41 #define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */
42 #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */
43 #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
44 #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dtest_tunnel_kern.c1 // SPDX-License-Identifier: GPL-2.0
38 __u8 opt_data[8]; /* hard-coded to 8 byte */
49 struct bpf_tunnel_key key; in _gre_set_tunnel() local
51 __builtin_memset(&key, 0x0, sizeof(key)); in _gre_set_tunnel()
52 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in _gre_set_tunnel()
53 key.tunnel_id = 2; in _gre_set_tunnel()
54 key.tunnel_tos = 0; in _gre_set_tunnel()
55 key.tunnel_ttl = 64; in _gre_set_tunnel()
57 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in _gre_set_tunnel()
71 struct bpf_tunnel_key key; in _gre_get_tunnel() local
[all …]
/kernel/linux/linux-5.10/security/selinux/ss/
Davtab.c46 v = (v << r1) | (v >> (32 - r1)); \ in avtab_hash()
49 hash = (hash << r2) | (hash >> (32 - r2)); \ in avtab_hash()
53 mix(keyp->target_class); in avtab_hash()
54 mix(keyp->target_type); in avtab_hash()
55 mix(keyp->source_type); in avtab_hash()
71 struct avtab_key *key, struct avtab_datum *datum) in avtab_insert_node() argument
78 newnode->key = *key; in avtab_insert_node()
80 if (key->specified & AVTAB_XPERMS) { in avtab_insert_node()
86 *xperms = *(datum->u.xperms); in avtab_insert_node()
87 newnode->datum.u.xperms = xperms; in avtab_insert_node()
[all …]
/kernel/linux/linux-5.10/net/openvswitch/
Dflow.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2007-2014 Nicira, Inc.
50 idle_ms = jiffies_to_msecs(jiffies - flow_jiffies); in ovs_flow_used_time()
54 return cur_ms - idle_ms; in ovs_flow_used_time()
64 int len = skb->len + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); in ovs_flow_stats_update()
66 stats = rcu_dereference(flow->stats[cpu]); in ovs_flow_stats_update()
68 /* Check if already have CPU-specific stats. */ in ovs_flow_stats_update()
70 spin_lock(&stats->lock); in ovs_flow_stats_update()
71 /* Mark if we write on the pre-allocated stats. */ in ovs_flow_stats_update()
72 if (cpu == 0 && unlikely(flow->stats_last_writer != cpu)) in ovs_flow_stats_update()
[all …]
/kernel/linux/linux-5.10/include/linux/platform_data/
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 …]
/kernel/linux/linux-6.6/include/linux/platform_data/
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 …]
/kernel/linux/linux-6.6/kernel/
Djump_label.c1 // SPDX-License-Identifier: GPL-2.0-only
41 * Entrires are sorted by key. in jump_label_cmp()
44 return -1; in jump_label_cmp()
55 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()
74 jeb->code = tmp.code + delta; in jump_label_swap()
75 jeb->target = tmp.target + delta; in jump_label_swap()
[all …]

12345678910>>...46