aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-19 23:29:58 +0200
committerArd Biesheuvel <ardb@kernel.org>2022-10-21 11:09:40 +0200
commit8a254d90a77580244ec57e82bca7eb65656cc167 (patch)
tree070e9b3229edbf81b724c919be3e0d8b10e79ca2 /include
parentefi: ssdt: Don't free memory if ACPI table was loaded successfully (diff)
downloadlinux-dev-8a254d90a77580244ec57e82bca7eb65656cc167.tar.xz
linux-dev-8a254d90a77580244ec57e82bca7eb65656cc167.zip
efi: efivars: Fix variable writes without query_variable_store()
Commit bbc6d2c6ef22 ("efi: vars: Switch to new wrapper layer") refactored the efivars layer so that the 'business logic' related to which UEFI variables affect the boot flow in which way could be moved out of it, and into the efivarfs driver. This inadvertently broke setting variables on firmware implementations that lack the QueryVariableInfo() boot service, because we no longer tolerate a EFI_UNSUPPORTED result from check_var_size() when calling efivar_entry_set_get_size(), which now ends up calling check_var_size() a second time inadvertently. If QueryVariableInfo() is missing, we support writes of up to 64k - let's move that logic into check_var_size(), and drop the redundant call. Cc: <stable@vger.kernel.org> # v6.0 Fixes: bbc6d2c6ef22 ("efi: vars: Switch to new wrapper layer") Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index da3974bf05d3..80f3c1c7827d 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1085,9 +1085,6 @@ efi_status_t efivar_set_variable_locked(efi_char16_t *name, efi_guid_t *vendor,
efi_status_t efivar_set_variable(efi_char16_t *name, efi_guid_t *vendor,
u32 attr, unsigned long data_size, void *data);
-efi_status_t check_var_size(u32 attributes, unsigned long size);
-efi_status_t check_var_size_nonblocking(u32 attributes, unsigned long size);
-
#if IS_ENABLED(CONFIG_EFI_CAPSULE_LOADER)
extern bool efi_capsule_pending(int *reset_type);