* [PATCH v2 1/1] efi_loader: update secure state
@ 2020-07-14 16:08 Heinrich Schuchardt
2020-07-14 20:34 ` ilias.apalodimas at linaro.org
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-07-14 16:08 UTC (permalink / raw)
To: u-boot
Update the UEFI secure state when variable 'PK' is updated in the TEE
variables implementation.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
v2:
simplify the logic for handling return codes
---
lib/efi_loader/efi_variable_tee.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/efi_loader/efi_variable_tee.c b/lib/efi_loader/efi_variable_tee.c
index 24e0663ebd..ddefa93f8f 100644
--- a/lib/efi_loader/efi_variable_tee.c
+++ b/lib/efi_loader/efi_variable_tee.c
@@ -557,6 +557,12 @@ efi_status_t efi_set_variable_int(u16 *variable_name, const efi_guid_t *vendor,
var_property.maxsize = var_acc->data_size;
ret = set_property_int(variable_name, name_size, vendor, &var_property);
}
+
+ if (alt_ret != EFI_SUCCESS)
+ goto out;
+
+ if (!u16_strcmp(variable_name, L"PK"))
+ alt_ret = efi_init_secure_state();
out:
free(comm_buf);
return alt_ret == EFI_SUCCESS ? ret : alt_ret;
@@ -716,5 +722,9 @@ efi_status_t efi_init_variables(void)
MM_VARIABLE_COMMUNICATE_SIZE +
max_payload_size;
+ ret = efi_init_secure_state();
+ if (ret != EFI_SUCCESS)
+ return ret;
+
return EFI_SUCCESS;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2 1/1] efi_loader: update secure state
2020-07-14 16:08 [PATCH v2 1/1] efi_loader: update secure state Heinrich Schuchardt
@ 2020-07-14 20:34 ` ilias.apalodimas at linaro.org
0 siblings, 0 replies; 2+ messages in thread
From: ilias.apalodimas at linaro.org @ 2020-07-14 20:34 UTC (permalink / raw)
To: u-boot
On Tue, Jul 14, 2020 at 06:08:15PM +0200, Heinrich Schuchardt wrote:
> Update the UEFI secure state when variable 'PK' is updated in the TEE
> variables implementation.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> v2:
> simplify the logic for handling return codes
> ---
> lib/efi_loader/efi_variable_tee.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/lib/efi_loader/efi_variable_tee.c b/lib/efi_loader/efi_variable_tee.c
> index 24e0663ebd..ddefa93f8f 100644
> --- a/lib/efi_loader/efi_variable_tee.c
> +++ b/lib/efi_loader/efi_variable_tee.c
> @@ -557,6 +557,12 @@ efi_status_t efi_set_variable_int(u16 *variable_name, const efi_guid_t *vendor,
> var_property.maxsize = var_acc->data_size;
> ret = set_property_int(variable_name, name_size, vendor, &var_property);
> }
> +
> + if (alt_ret != EFI_SUCCESS)
> + goto out;
> +
> + if (!u16_strcmp(variable_name, L"PK"))
> + alt_ret = efi_init_secure_state();
> out:
> free(comm_buf);
> return alt_ret == EFI_SUCCESS ? ret : alt_ret;
> @@ -716,5 +722,9 @@ efi_status_t efi_init_variables(void)
> MM_VARIABLE_COMMUNICATE_SIZE +
> max_payload_size;
>
> + ret = efi_init_secure_state();
> + if (ret != EFI_SUCCESS)
> + return ret;
> +
> return EFI_SUCCESS;
> }
> --
> 2.27.0
>
Just a note here this depends on [1].
With that applied
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
[1] https://lists.denx.de/pipermail/u-boot/2020-July/419473.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-14 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 16:08 [PATCH v2 1/1] efi_loader: update secure state Heinrich Schuchardt
2020-07-14 20:34 ` ilias.apalodimas at linaro.org
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.