diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-03 17:33:35 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-08 13:03:34 +0200 |
commit | e0fa2cf39cedd9297c16bc4ea4ff5c512bb4e0ec (patch) | |
tree | cfd0fe39618a3053d9d46173644d1d963acea0bc | |
parent | 3b51c3a0b03411b07f0acd8bf2361ba54043fdcf (diff) | |
download | u-boot-e0fa2cf39cedd9297c16bc4ea4ff5c512bb4e0ec.zip u-boot-e0fa2cf39cedd9297c16bc4ea4ff5c512bb4e0ec.tar.gz u-boot-e0fa2cf39cedd9297c16bc4ea4ff5c512bb4e0ec.tar.bz2 |
efi_loader: handle EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS
We don't yet support EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS for file
based variables, but we should pass it to TEE based variable stores.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r-- | include/efi.h | 3 | ||||
-rw-r--r-- | lib/efi_loader/efi_variable.c | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/efi.h b/include/efi.h index 62cfb99..c3c4b93 100644 --- a/include/efi.h +++ b/include/efi.h @@ -507,7 +507,8 @@ extern char _binary_u_boot_bin_start[], _binary_u_boot_bin_end[]; EFI_VARIABLE_HARDWARE_ERROR_RECORD | \ EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \ - EFI_VARIABLE_APPEND_WRITE) + EFI_VARIABLE_APPEND_WRITE | \ + EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS) /** * efi_get_priv() - Get access to the EFI-private information diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index b2f8ebd..6fe3792 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -235,8 +235,12 @@ efi_status_t efi_set_variable_int(const u16 *variable_name, if (data_size && !data) return EFI_INVALID_PARAMETER; - /* EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated */ - if (attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) + /* + * EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated. + * We don't support EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS. + */ + if (attributes & (EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ + EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS)) return EFI_UNSUPPORTED; /* Make sure if runtime bit is set, boot service bit is set also */ |