]> Git Repo - J-u-boot.git/commitdiff
tpm: Rename tpm2_allow_extend()
authorIlias Apalodimas <[email protected]>
Tue, 24 Dec 2024 16:01:05 +0000 (08:01 -0800)
committerIlias Apalodimas <[email protected]>
Tue, 7 Jan 2025 13:45:51 +0000 (15:45 +0200)
When that function was introduced we were only using it to check if
extending a PCR was allowed, so the name made sense. A few patches ago
we used that function to reason about the EventLog creation and general
usage of PCRs , so let's rename it to something more generic that makes
more sense in all contexts.

Signed-off-by: Raymond Mao <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
include/tpm-v2.h
lib/tpm-v2.c

index 8c43f4fd9b59d3b5c107ec22578b1d3098b2bd6c..87b2c614ad277284aa88c106add8598cc83a59d4 100644 (file)
@@ -732,12 +732,13 @@ u16 tpm2_algorithm_to_len(enum tpm2_algorithms algo);
  */
 
 /**
- * tpm2_allow_extend() - Check if extending PCRs is allowed and safe
+ * tpm2_check_active_banks() - Check if the active PCR banks are supported by
+ *                             our configuration
  *
  * @dev: TPM device
  * Return: true if allowed
  */
-bool tpm2_allow_extend(struct udevice *dev);
+bool tpm2_check_active_banks(struct udevice *dev);
 
 /**
  * tpm2_is_active_bank() - check the pcr_select. If at least one of the PCRs
index cb636414de9876ee47d2defe49cacd8fc59807c3..0edb0aa90c9f0b6d6b825695fd17c354976a688d 100644 (file)
@@ -197,7 +197,7 @@ u32 tpm2_pcr_extend(struct udevice *dev, u32 index, u32 algorithm,
        if (!digest)
                return -EINVAL;
 
-       if (!tpm2_allow_extend(dev)) {
+       if (!tpm2_check_active_banks(dev)) {
                log_err("Cannot extend PCRs if all the TPM enabled algorithms are not supported\n");
                return -EINVAL;
        }
@@ -896,7 +896,7 @@ u16 tpm2_algorithm_to_len(enum tpm2_algorithms algo)
        return 0;
 }
 
-bool tpm2_allow_extend(struct udevice *dev)
+bool tpm2_check_active_banks(struct udevice *dev)
 {
        struct tpml_pcr_selection pcrs;
        size_t i;
This page took 0.037441 seconds and 4 git commands to generate.