Skip to contentSkip to conversation

efi: efibc: avoid efivar API for setting variables

PATCH New Ard Biesheuvel 1 participant 1 message Jun 20, 2022 EFI

lore
Share & tools
lore

Ard Biesheuvel

author maintainer
#0 lore raw

PATCH 1/1 efi: efibc: avoid efivar API for setting variables

Avoid abusing the efivar API by passing locally instantiated efivar_entry structs into efivar_set_entry_safe(), rather than using the API as intended. Instead, just call efi.set_variable() directly.

---
 drivers/firmware/efi/Kconfig |  1 +
 drivers/firmware/efi/efibc.c | 76 ++++++++++++++----------------------
 2 files changed, 30 insertions(+), 47 deletions(-)
drivers/firmware/efi/Kconfig +1 -0
index 7aa4717cdcac..6fd4414c4836 100644
@@ -145,6 +145,7 @@ config EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER
 
 config EFI_BOOTLOADER_CONTROL
 	tristate "EFI Bootloader Control"
+	select UCS2_STRING
 	default n
 	help
 	  This module installs a reboot hook, such that if reboot() is
drivers/firmware/efi/efibc.c +29 -47

105 lines not on this page · raw message

Signature · 1 line
2.35.1