| /kernel/linux/linux-5.10/drivers/input/keyboard/ |
| D | ipaq-micro-keys.c | 43 struct ipaq_micro_keys *keys = data; in micro_key_receive() local 50 input_report_key(keys->input, keys->codes[key], down); in micro_key_receive() 51 input_sync(keys->input); in micro_key_receive() 55 static void micro_key_start(struct ipaq_micro_keys *keys) in micro_key_start() argument 57 spin_lock(&keys->micro->lock); in micro_key_start() 58 keys->micro->key = micro_key_receive; in micro_key_start() 59 keys->micro->key_data = keys; in micro_key_start() 60 spin_unlock(&keys->micro->lock); in micro_key_start() 63 static void micro_key_stop(struct ipaq_micro_keys *keys) in micro_key_stop() argument 65 spin_lock(&keys->micro->lock); in micro_key_stop() [all …]
|
| D | mtk-pmic-keys.c | 78 struct mtk_pmic_keys *keys; member 89 struct mtk_pmic_keys_info keys[MTK_PMIC_MAX_KEY_COUNT]; member 98 static void mtk_pmic_keys_lp_reset_setup(struct mtk_pmic_keys *keys, in mtk_pmic_keys_lp_reset_setup() argument 104 ret = of_property_read_u32(keys->dev->of_node, in mtk_pmic_keys_lp_reset_setup() 109 regmap_update_bits(keys->regmap, pmic_rst_reg, in mtk_pmic_keys_lp_reset_setup() 113 ret = of_property_read_u32(keys->dev->of_node, in mtk_pmic_keys_lp_reset_setup() 120 regmap_update_bits(keys->regmap, pmic_rst_reg, in mtk_pmic_keys_lp_reset_setup() 123 regmap_update_bits(keys->regmap, pmic_rst_reg, in mtk_pmic_keys_lp_reset_setup() 128 regmap_update_bits(keys->regmap, pmic_rst_reg, in mtk_pmic_keys_lp_reset_setup() 131 regmap_update_bits(keys->regmap, pmic_rst_reg, in mtk_pmic_keys_lp_reset_setup() [all …]
|
| /kernel/linux/linux-6.6/drivers/input/keyboard/ |
| D | ipaq-micro-keys.c | 43 struct ipaq_micro_keys *keys = data; in micro_key_receive() local 50 input_report_key(keys->input, keys->codes[key], down); in micro_key_receive() 51 input_sync(keys->input); in micro_key_receive() 55 static void micro_key_start(struct ipaq_micro_keys *keys) in micro_key_start() argument 57 spin_lock(&keys->micro->lock); in micro_key_start() 58 keys->micro->key = micro_key_receive; in micro_key_start() 59 keys->micro->key_data = keys; in micro_key_start() 60 spin_unlock(&keys->micro->lock); in micro_key_start() 63 static void micro_key_stop(struct ipaq_micro_keys *keys) in micro_key_stop() argument 65 spin_lock(&keys->micro->lock); in micro_key_stop() [all …]
|
| D | mtk-pmic-keys.c | 121 struct mtk_pmic_keys *keys; member 133 struct mtk_pmic_keys_info keys[MTK_PMIC_MAX_KEY_COUNT]; member 142 static void mtk_pmic_keys_lp_reset_setup(struct mtk_pmic_keys *keys, in mtk_pmic_keys_lp_reset_setup() argument 153 error = of_property_read_u32(keys->dev->of_node, "power-off-time-sec", in mtk_pmic_keys_lp_reset_setup() 161 error = of_property_read_u32(keys->dev->of_node, in mtk_pmic_keys_lp_reset_setup() 185 regmap_update_bits(keys->regmap, regs->pmic_rst_reg, mask, value); in mtk_pmic_keys_lp_reset_setup() 193 regmap_read(info->keys->regmap, info->regs->deb_reg, &key_deb); in mtk_pmic_keys_irq_handler_thread() 199 input_report_key(info->keys->input_dev, info->keycode, pressed); in mtk_pmic_keys_irq_handler_thread() 200 input_sync(info->keys->input_dev); in mtk_pmic_keys_irq_handler_thread() 202 dev_dbg(info->keys->dev, "(%s) key =%d using PMIC\n", in mtk_pmic_keys_irq_handler_thread() [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
| D | bpf_flow.c | 75 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 …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
| D | bpf_flow.c | 74 static __always_inline int export_flow_keys(struct bpf_flow_keys *keys, in export_flow_keys() argument 77 __u32 key = (__u32)(keys->sport) << 16 | keys->dport; in export_flow_keys() 80 memcpy(&val, keys, sizeof(val)); in export_flow_keys() 117 struct bpf_flow_keys *keys = skb->flow_keys; in parse_eth_proto() local 136 return export_flow_keys(keys, BPF_DROP); in parse_eth_proto() 139 return export_flow_keys(keys, BPF_DROP); in parse_eth_proto() 145 struct bpf_flow_keys *keys = skb->flow_keys; in _dissect() local 147 return parse_eth_proto(skb, keys->n_proto); in _dissect() 153 struct bpf_flow_keys *keys = skb->flow_keys; in parse_ip_proto() local 165 return export_flow_keys(keys, BPF_DROP); in parse_ip_proto() [all …]
|
| /kernel/linux/linux-6.6/security/keys/ |
| D | Kconfig | 6 config KEYS config 11 access keys in the kernel. 13 It also includes provision of methods by which such keys might be 18 a searchable sequence of keys. Each process is equipped with access 26 depends on KEYS 44 depends on KEYS 60 bool "Large payload keys" 61 depends on KEYS 65 This option provides support for holding large keys within the kernel 72 tristate "TRUSTED KEYS" [all …]
|
| /kernel/linux/linux-6.6/arch/arm64/include/asm/ |
| D | pointer_auth.h | 33 * 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 …]
|
| /kernel/linux/linux-5.10/security/keys/ |
| D | Kconfig | 6 config KEYS config 11 access keys in the kernel. 13 It also includes provision of methods by which such keys might be 18 a searchable sequence of keys. Each process is equipped with access 26 depends on KEYS 44 depends on KEYS 60 bool "Large payload keys" 61 depends on KEYS 65 This option provides support for holding large keys within the kernel 72 tristate "TRUSTED KEYS" [all …]
|
| /kernel/linux/linux-6.6/security/integrity/ |
| D | Kconfig | 22 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" 43 asymmetric keys. 46 bool "Require all keys on the integrity keyrings be signed" 51 This option requires that all keys added to the .ima and 56 bool "Provide keyring for platform/firmware trusted keys" 60 Provide a separate, distinct keyring for platform trusted keys, which 66 bool "Provide a keyring to which Machine Owner Keys may be added" [all …]
|
| /kernel/linux/linux-6.6/certs/ |
| D | Kconfig | 37 Note: Remove all ECDSA signing keys, e.g. certs/signing_key.pem, 43 bool "Provide system-wide ring of trusted keys" 44 depends on KEYS 48 Provide a system keyring to which trusted keys can be added. Keys in 49 the keyring are considered to be trusted. Keys may be added at will 51 userspace may only add extra keys if those keys can be verified by 52 keys already in the keyring. 54 Keys in this keyring are used by module signature checking. 57 string "Additional X.509 keys for default system keyring" 65 NOTE: If you previously provided keys for the system keyring in the [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/net/ |
| D | tcp_fastopen_backup_key.c | 5 * 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 …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/net/ |
| D | tcp_fastopen_backup_key.c | 5 * New keys are 'rotated' in two steps: 7 * 2) Make new key the primary by swapping the backup and primary keys 51 static void get_keys(int fd, uint32_t *keys) in get_keys() argument 57 if (getsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, &len)) in get_keys() 64 if (sscanf(buf, "%x-%x-%x-%x,%x-%x-%x-%x", keys, keys + 1, keys + 2, in get_keys() 65 keys + 3, keys + 4, keys + 5, keys + 6, keys + 7) != 8) in get_keys() 69 static void set_keys(int fd, uint32_t *keys) in set_keys() argument 74 if (setsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, in set_keys() 81 keys[0], keys[1], keys[2], keys[3], keys[4], keys[5], in set_keys() 82 keys[6], keys[7]); in set_keys() [all …]
|
| /kernel/linux/linux-5.10/arch/arm64/include/asm/ |
| D | pointer_auth.h | 22 * We give each process its own keys, which are shared by all threads. The keys 37 static inline void ptrauth_keys_init_user(struct ptrauth_keys_user *keys) in ptrauth_keys_init_user() argument 40 get_random_bytes(&keys->apia, sizeof(keys->apia)); in ptrauth_keys_init_user() 41 get_random_bytes(&keys->apib, sizeof(keys->apib)); in ptrauth_keys_init_user() 42 get_random_bytes(&keys->apda, sizeof(keys->apda)); in ptrauth_keys_init_user() 43 get_random_bytes(&keys->apdb, sizeof(keys->apdb)); in ptrauth_keys_init_user() 47 get_random_bytes(&keys->apga, sizeof(keys->apga)); in ptrauth_keys_init_user() 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 [all …]
|
| /kernel/linux/linux-5.10/certs/ |
| D | Kconfig | 39 Note: Remove all ECDSA signing keys, e.g. certs/signing_key.pem, 45 bool "Provide system-wide ring of trusted keys" 46 depends on KEYS 49 Provide a system keyring to which trusted keys can be added. Keys in 50 the keyring are considered to be trusted. Keys may be added at will 52 userspace may only add extra keys if those keys can be verified by 53 keys already in the keyring. 55 Keys in this keyring are used by module signature checking. 58 string "Additional X.509 keys for default system keyring" 66 NOTE: If you previously provided keys for the system keyring in the [all …]
|
| /kernel/linux/linux-6.6/arch/arm64/kernel/ |
| D | pointer_auth.c | 13 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 …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/bpf/map_tests/ |
| D | htab_map_batch_ops.c | 13 static void map_batch_update(int map_fd, __u32 max_entries, int *keys, in map_batch_update() argument 28 keys[i] = i + 1; in map_batch_update() 36 err = bpf_map_update_batch(map_fd, keys, values, &max_entries, &opts); in map_batch_update() 41 int *keys, void *values, bool is_pcpu) in map_batch_verify() argument 55 CHECK(keys[i] + 1 + j != bpf_percpu(v[i], j), in map_batch_verify() 58 i, j, keys[i], bpf_percpu(v[i], j)); in map_batch_verify() 61 CHECK(keys[i] + 1 != ((int *)values)[i], in map_batch_verify() 63 "error: i %d key %d value %d\n", i, keys[i], in map_batch_verify() 72 "error: keys array at index %d missing\n", i); in map_batch_verify() 80 int map_fd, *keys, *visited, key; in __test_map_lookup_and_delete_batch() local [all …]
|
| D | array_map_batch_ops.c | 12 static void map_batch_update(int map_fd, __u32 max_entries, int *keys, in map_batch_update() argument 22 keys[i] = i; in map_batch_update() 26 err = bpf_map_update_batch(map_fd, keys, values, &max_entries, &opts); in map_batch_update() 31 int *keys, int *values) in map_batch_verify() argument 37 CHECK(keys[i] + 1 != values[i], "key/value checking", in map_batch_verify() 38 "error: i %d key %d value %d\n", i, keys[i], values[i]); in map_batch_verify() 43 "error: keys array at index %d missing\n", i); in map_batch_verify() 55 int map_fd, *keys, *values, *visited; in test_array_map_batch_ops() local 71 keys = malloc(max_entries * sizeof(int)); in test_array_map_batch_ops() 74 CHECK(!keys || !values || !visited, "malloc()", "error:%s\n", in test_array_map_batch_ops() [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/bpf/map_tests/ |
| D | htab_map_batch_ops.c | 14 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 …]
|
| D | array_map_batch_ops.c | 15 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 …]
|
| /kernel/linux/linux-5.10/arch/arm64/kernel/ |
| D | pointer_auth.c | 13 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()
|
| /kernel/linux/linux-6.6/lib/ |
| D | test_static_keys.c | 3 * 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 …]
|
| /kernel/linux/linux-5.10/lib/ |
| D | test_static_keys.c | 3 * 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 …]
|
| /kernel/linux/linux-5.10/Documentation/security/keys/ |
| D | trusted-encrypted.rst | 2 Trusted and Encrypted Keys 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, 7 and in both cases all keys are created in the kernel, and user space sees, 8 stores, and loads only encrypted blobs. Trusted Keys require the availability 10 Keys can be used on any system. All user level blobs, are displayed and loaded 13 Trusted Keys use a TPM both to generate and to seal the keys. Keys are sealed 17 (future) PCR values, so keys are easily migrated to new pcr values, such as 24 By default, trusted keys are sealed under the SRK, which has the default 77 TPM_STORED_DATA format. The key length for new keys are always in bytes. [all …]
|
| /kernel/linux/linux-6.6/Documentation/security/keys/ |
| D | trusted-encrypted.rst | 2 Trusted and Encrypted Keys 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, 7 and in both cases all keys are created in the kernel, and user space sees, 8 stores, and loads only encrypted blobs. Trusted Keys require the availability 9 of a Trust Source for greater security, while Encrypted Keys can be used on any 17 A trust source provides the source of security for Trusted Keys. This 23 consumer of the Trusted Keys to determine if the trust source is sufficiently 64 Keys can be optionally sealed to specified PCR (integrity measurement) 67 (future) PCR values, so keys are easily migrated to new PCR values, [all …]
|