linux/fs/efivarfs
Ard Biesheuvel 8a254d90a7 efi: efivars: Fix variable writes without query_variable_store()
Commit bbc6d2c6ef ("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: bbc6d2c6ef ("efi: vars: Switch to new wrapper layer")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2022-10-21 11:09:40 +02:00
..
file.c efivars: convert to fileattr 2021-04-12 15:04:29 +02:00
inode.c efivars: convert to fileattr 2021-04-12 15:04:29 +02:00
internal.h efi: vars: Move efivar caching layer into efivarfs 2022-06-24 20:40:19 +02:00
Kconfig
Makefile efi: vars: Move efivar caching layer into efivarfs 2022-06-24 20:40:19 +02:00
super.c efi: vars: Use locking version to iterate over efivars linked lists 2022-06-24 20:40:19 +02:00
vars.c efi: efivars: Fix variable writes without query_variable_store() 2022-10-21 11:09:40 +02:00