/kernel/linux/linux-5.10/security/integrity/ima/ |
H A D | ima_queue.c | 25 static struct tpm_digest *digests; variable 58 rc = memcmp(qe->entry->digests[ima_hash_algo_idx].digest, in ima_lookup_digest_entry() 111 key = ima_hash_key(entry->digests[ima_hash_algo_idx].digest); in ima_add_digest_entry() 163 u8 *digest = entry->digests[ima_hash_algo_idx].digest; in ima_add_template_entry() 164 struct tpm_digest *digests_arg = entry->digests; in ima_add_template_entry() 187 digests_arg = digests; in ima_add_template_entry() 222 digests = kcalloc(ima_tpm_chip->nr_allocated_banks, sizeof(*digests), in ima_init_digests() 224 if (!digests) in ima_init_digests() 228 digests[ in ima_init_digests() [all...] |
H A D | ima_api.c | 30 kfree(entry->digests); in ima_free_template_entry() 42 struct tpm_digest *digests; in ima_alloc_init_template() local 55 digests = kcalloc(NR_BANKS(ima_tpm_chip) + ima_extra_slots, in ima_alloc_init_template() 56 sizeof(*digests), GFP_NOFS); in ima_alloc_init_template() 57 if (!digests) { in ima_alloc_init_template() 63 (*entry)->digests = digests; in ima_alloc_init_template()
|
H A D | ima_template.c | 311 struct tpm_digest *digests; in ima_restore_template_data() local 320 digests = kcalloc(NR_BANKS(ima_tpm_chip) + ima_extra_slots, in ima_restore_template_data() 321 sizeof(*digests), GFP_NOFS); in ima_restore_template_data() 322 if (!digests) { in ima_restore_template_data() 327 (*entry)->digests = digests; in ima_restore_template_data() 334 kfree((*entry)->digests); in ima_restore_template_data()
|
H A D | ima_crypto.c | 622 rc = crypto_shash_final(shash, entry->digests[tfm_idx].digest); in ima_calc_field_array_hash_tfm() 637 entry->digests[ima_sha1_idx].alg_id = TPM_ALG_SHA1; in ima_calc_field_array_hash() 645 entry->digests[i].alg_id = alg_id; in ima_calc_field_array_hash() 650 memcpy(entry->digests[i].digest, in ima_calc_field_array_hash() 651 entry->digests[ima_sha1_idx].digest, in ima_calc_field_array_hash() 830 * non-SHA1 boot_aggregate digests to avoid ambiguity. in ima_calc_boot_aggregate_tfm()
|
H A D | ima_fs.c | 154 ima_putc(m, e->digests[ima_sha1_idx].digest, TPM_DIGEST_SIZE); in ima_measurements_show() 237 ima_print_digest(m, e->digests[ima_sha1_idx].digest, TPM_DIGEST_SIZE); in ima_ascii_measurements_show()
|
H A D | ima.h | 101 struct tpm_digest *digests; member
|
/kernel/linux/linux-6.6/security/integrity/ima/ |
H A D | ima_queue.c | 25 static struct tpm_digest *digests; variable 58 rc = memcmp(qe->entry->digests[ima_hash_algo_idx].digest, in ima_lookup_digest_entry() 111 key = ima_hash_key(entry->digests[ima_hash_algo_idx].digest); in ima_add_digest_entry() 163 u8 *digest = entry->digests[ima_hash_algo_idx].digest; in ima_add_template_entry() 164 struct tpm_digest *digests_arg = entry->digests; in ima_add_template_entry() 188 digests_arg = digests; in ima_add_template_entry() 223 digests = kcalloc(ima_tpm_chip->nr_allocated_banks, sizeof(*digests), in ima_init_digests() 225 if (!digests) in ima_init_digests() 229 digests[ in ima_init_digests() [all...] |
H A D | ima_api.c | 30 kfree(entry->digests); in ima_free_template_entry() 42 struct tpm_digest *digests; in ima_alloc_init_template() local 55 digests = kcalloc(NR_BANKS(ima_tpm_chip) + ima_extra_slots, in ima_alloc_init_template() 56 sizeof(*digests), GFP_NOFS); in ima_alloc_init_template() 57 if (!digests) { in ima_alloc_init_template() 63 (*entry)->digests = digests; in ima_alloc_init_template()
|
H A D | ima_template.c | 361 struct tpm_digest *digests; in ima_restore_template_data() local 370 digests = kcalloc(NR_BANKS(ima_tpm_chip) + ima_extra_slots, in ima_restore_template_data() 371 sizeof(*digests), GFP_NOFS); in ima_restore_template_data() 372 if (!digests) { in ima_restore_template_data() 377 (*entry)->digests = digests; in ima_restore_template_data() 384 kfree((*entry)->digests); in ima_restore_template_data()
|
H A D | ima_crypto.c | 622 rc = crypto_shash_final(shash, entry->digests[tfm_idx].digest); in ima_calc_field_array_hash_tfm() 637 entry->digests[ima_sha1_idx].alg_id = TPM_ALG_SHA1; in ima_calc_field_array_hash() 645 entry->digests[i].alg_id = alg_id; in ima_calc_field_array_hash() 650 memcpy(entry->digests[i].digest, in ima_calc_field_array_hash() 651 entry->digests[ima_sha1_idx].digest, in ima_calc_field_array_hash() 830 * non-SHA1 boot_aggregate digests to avoid ambiguity. in ima_calc_boot_aggregate_tfm()
|
H A D | ima_fs.c | 154 ima_putc(m, e->digests[ima_sha1_idx].digest, TPM_DIGEST_SIZE); in ima_measurements_show() 237 ima_print_digest(m, e->digests[ima_sha1_idx].digest, TPM_DIGEST_SIZE); in ima_ascii_measurements_show()
|
H A D | ima.h | 49 /* bitset of digests algorithms allowed in the setxattr hook */ 100 struct tpm_digest *digests; member
|
/kernel/linux/linux-5.10/drivers/char/tpm/ |
H A D | tpm-interface.c | 307 * @digests: array of tpm_digest structures used to extend PCRs 315 struct tpm_digest *digests) in tpm_pcr_extend() 325 if (digests[i].alg_id != chip->allocated_banks[i].alg_id) { in tpm_pcr_extend() 332 rc = tpm2_pcr_extend(chip, pcr_idx, digests); in tpm_pcr_extend() 336 rc = tpm1_pcr_extend(chip, pcr_idx, digests[0].digest, in tpm_pcr_extend() 314 tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, struct tpm_digest *digests) tpm_pcr_extend() argument
|
H A D | tpm2-cmd.c | 231 * @digests: list of pcr banks and corresponding digest values to extend. 236 struct tpm_digest *digests) in tpm2_pcr_extend() 260 tpm_buf_append_u16(&buf, digests[i].alg_id); in tpm2_pcr_extend() 261 tpm_buf_append(&buf, (const unsigned char *)&digests[i].digest, in tpm2_pcr_extend() 235 tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, struct tpm_digest *digests) tpm2_pcr_extend() argument
|
H A D | tpm.h | 218 struct tpm_digest *digests);
|
/kernel/linux/linux-6.6/drivers/char/tpm/ |
H A D | tpm-interface.c | 307 * @digests: array of tpm_digest structures used to extend PCRs 315 struct tpm_digest *digests) in tpm_pcr_extend() 325 if (digests[i].alg_id != chip->allocated_banks[i].alg_id) { in tpm_pcr_extend() 332 rc = tpm2_pcr_extend(chip, pcr_idx, digests); in tpm_pcr_extend() 336 rc = tpm1_pcr_extend(chip, pcr_idx, digests[0].digest, in tpm_pcr_extend() 314 tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, struct tpm_digest *digests) tpm_pcr_extend() argument
|
H A D | tpm2-cmd.c | 231 * @digests: list of pcr banks and corresponding digest values to extend. 236 struct tpm_digest *digests) in tpm2_pcr_extend() 260 tpm_buf_append_u16(&buf, digests[i].alg_id); in tpm2_pcr_extend() 261 tpm_buf_append(&buf, (const unsigned char *)&digests[i].digest, in tpm2_pcr_extend() 235 tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, struct tpm_digest *digests) tpm2_pcr_extend() argument
|
H A D | tpm.h | 294 struct tpm_digest *digests);
|
/kernel/linux/linux-6.6/security/keys/trusted-keys/ |
H A D | trusted_tpm1.c | 28 static struct tpm_digest *digests; variable 385 return tpm_pcr_extend(chip, pcrnum, digests) ? -EINVAL : 0; in pcrlock() 1019 digests = kcalloc(chip->nr_allocated_banks, sizeof(*digests), in init_digests() 1021 if (!digests) in init_digests() 1025 digests[i].alg_id = chip->allocated_banks[i].alg_id; in init_digests() 1051 kfree(digests); in trusted_tpm_init() 1061 kfree(digests); in trusted_tpm_exit()
|
/kernel/linux/linux-5.10/include/linux/ |
H A D | tpm_eventlog.h | 114 struct tpm_digest digests[]; member 147 * The TPM2 event log format can contain multiple digests corresponding to 229 halg_size = sizeof(event->digests[i].alg_id); in __calc_tpm2_event_size()
|
H A D | tpm.h | 408 struct tpm_digest *digests); 425 struct tpm_digest *digests) in tpm_pcr_extend() 424 tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, struct tpm_digest *digests) tpm_pcr_extend() argument
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | tpm_eventlog.h | 114 struct tpm_digest digests[]; member 147 * The TPM2 event log format can contain multiple digests corresponding to 229 halg_size = sizeof(event->digests[i].alg_id); in __calc_tpm2_event_size()
|
H A D | tpm.h | 431 struct tpm_digest *digests); 448 struct tpm_digest *digests) in tpm_pcr_extend() 447 tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, struct tpm_digest *digests) tpm_pcr_extend() argument
|
/kernel/linux/linux-5.10/security/keys/trusted-keys/ |
H A D | trusted_tpm1.c | 35 static struct tpm_digest *digests; variable 392 return tpm_pcr_extend(chip, pcrnum, digests) ? -EINVAL : 0; in pcrlock() 1245 digests = kcalloc(chip->nr_allocated_banks, sizeof(*digests), in init_digests() 1247 if (!digests) in init_digests() 1251 digests[i].alg_id = chip->allocated_banks[i].alg_id; in init_digests() 1280 kfree(digests); in init_trusted() 1290 kfree(digests); in cleanup_trusted()
|