security/tpm: Change wording of variable names
Change the name of these variables to 'allowlist'. Change-Id: I9d5553988a1c9972b8f1ebaeee20878b23a8aa9b Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42316 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
c7e2b6d140
commit
ab673cee08
|
@ -85,21 +85,21 @@ uint32_t tspi_init_crtm(void)
|
||||||
|
|
||||||
static bool is_runtime_data(const char *name)
|
static bool is_runtime_data(const char *name)
|
||||||
{
|
{
|
||||||
const char *whitelist = CONFIG_TPM_MEASURED_BOOT_RUNTIME_DATA;
|
const char *allowlist = CONFIG_TPM_MEASURED_BOOT_RUNTIME_DATA;
|
||||||
size_t whitelist_len = sizeof(CONFIG_TPM_MEASURED_BOOT_RUNTIME_DATA) - 1;
|
size_t allowlist_len = sizeof(CONFIG_TPM_MEASURED_BOOT_RUNTIME_DATA) - 1;
|
||||||
size_t name_len = strlen(name);
|
size_t name_len = strlen(name);
|
||||||
const char *end;
|
const char *end;
|
||||||
|
|
||||||
if (!whitelist_len || !name_len)
|
if (!allowlist_len || !name_len)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while ((end = strchr(whitelist, ' '))) {
|
while ((end = strchr(allowlist, ' '))) {
|
||||||
if (end - whitelist == name_len && !strncmp(whitelist, name, name_len))
|
if (end - allowlist == name_len && !strncmp(allowlist, name, name_len))
|
||||||
return true;
|
return true;
|
||||||
whitelist = end + 1;
|
allowlist = end + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return !strcmp(whitelist, name);
|
return !strcmp(allowlist, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t tspi_measure_cbfs_hook(struct cbfsf *fh, const char *name)
|
uint32_t tspi_measure_cbfs_hook(struct cbfsf *fh, const char *name)
|
||||||
|
|
Loading…
Reference in New Issue