Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

efi: efivars: limit availability to X86 builds

CONFIG_EFI_VARS controls the code that exposes EFI variables via
sysfs entries, which was deprecated before support for non-Intel
architectures was added to EFI. So let's limit its availability
to Intel architectures for the time being, and hopefully remove
it entirely in the not too distant future.

While at it, let's remove the module alias so that the module is
no longer loaded automatically.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+5 -11
+1 -1
Documentation/arm/uefi.rst
··· 23 23 For actually enabling [U]EFI support, enable: 24 24 25 25 - CONFIG_EFI=y 26 - - CONFIG_EFI_VARS=y or m 26 + - CONFIG_EFIVAR_FS=y or m 27 27 28 28 The implementation depends on receiving information about the UEFI environment 29 29 in a Flattened Device Tree (FDT) - so is only available with CONFIG_OF.
+4 -9
drivers/firmware/efi/Kconfig
··· 4 4 5 5 config EFI_VARS 6 6 tristate "EFI Variable Support via sysfs" 7 - depends on EFI 7 + depends on EFI && (X86 || IA64) 8 8 default n 9 9 help 10 10 If you say Y here, you are able to get EFI (Extensible Firmware 11 11 Interface) variable information via sysfs. You may read, 12 12 write, create, and destroy EFI variables through this interface. 13 - 14 - Note that using this driver in concert with efibootmgr requires 15 - at least test release version 0.5.0-test3 or later, which is 16 - available from: 17 - <http://linux.dell.com/efibootmgr/testing/efibootmgr-0.5.0-test3.tar.gz> 18 - 19 - Subsequent efibootmgr releases may be found at: 20 - <http://github.com/vathpela/efibootmgr> 13 + Note that this driver is only retained for compatibility with 14 + legacy users: new users should use the efivarfs filesystem 15 + instead. 21 16 22 17 config EFI_ESRT 23 18 bool
-1
drivers/firmware/efi/efivars.c
··· 22 22 MODULE_DESCRIPTION("sysfs interface to EFI Variables"); 23 23 MODULE_LICENSE("GPL"); 24 24 MODULE_VERSION(EFIVARS_VERSION); 25 - MODULE_ALIAS("platform:efivars"); 26 25 27 26 static LIST_HEAD(efivar_sysfs_list); 28 27