Skip to content

Commit

Permalink
efi: vars: Remove deprecated 'efivars' sysfs interface
Browse files Browse the repository at this point in the history
Commit 5d9db88 ("efi: Add support for a UEFI variable filesystem")
dated Oct 5, 2012, introduced a new efivarfs pseudo-filesystem to
replace the efivars sysfs interface that was used up to that point to
expose EFI variables to user space.

The main problem with the sysfs interface was that it only supported up
to 1024 bytes of payload per file, whereas the underlying variables
themselves are only bounded by a platform specific per-variable and
global limit that is typically much higher than 1024 bytes.

The deprecated sysfs interface is only enabled on x86 and Itanium, other
EFI enabled architectures only support the efivarfs pseudo-filesystem.

So let's finally rip off the band aid, and drop the old interface
entirely. This will make it easier to refactor and clean up the
underlying infrastructure that is shared between efivars, efivarfs and
efi-pstore, and is long overdue for a makeover.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
  • Loading branch information
ardbiesheuvel committed Jun 24, 2022
1 parent 5ac9413 commit 0f5b2c6
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 963 deletions.
2 changes: 1 addition & 1 deletion Documentation/x86/x86_64/uefi.rst
Expand Up @@ -29,7 +29,7 @@ Mechanics
be selected::

CONFIG_EFI=y
CONFIG_EFI_VARS=y or m # optional
CONFIG_EFIVAR_FS=y or m # optional

- Create a VFAT partition on the disk
- Copy the following to the VFAT partition:
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/milbeaut_m10v_defconfig
Expand Up @@ -44,7 +44,6 @@ CONFIG_ARM_CPUIDLE=y
CONFIG_VFP=y
CONFIG_NEON=y
CONFIG_KERNEL_MODE_NEON=y
CONFIG_EFI_VARS=m
CONFIG_EFI_CAPSULE_LOADER=m
CONFIG_ARM_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM_NEON=m
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/configs/bigsur_defconfig
Expand Up @@ -10,7 +10,6 @@ CONFIG_SMP=y
CONFIG_NR_CPUS=2
CONFIG_PREEMPT=y
CONFIG_IA64_PALINFO=y
CONFIG_EFI_VARS=y
CONFIG_BINFMT_MISC=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/configs/generic_defconfig
Expand Up @@ -21,7 +21,6 @@ CONFIG_IA64_MCA_RECOVERY=y
CONFIG_IA64_PALINFO=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_EFI_VARS=y
CONFIG_BINFMT_MISC=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/configs/gensparse_defconfig
Expand Up @@ -18,7 +18,6 @@ CONFIG_HOTPLUG_CPU=y
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_IA64_MCA_RECOVERY=y
CONFIG_IA64_PALINFO=y
CONFIG_EFI_VARS=y
CONFIG_BINFMT_MISC=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/configs/tiger_defconfig
Expand Up @@ -23,7 +23,6 @@ CONFIG_FORCE_CPEI_RETARGET=y
CONFIG_IA64_MCA_RECOVERY=y
CONFIG_IA64_PALINFO=y
CONFIG_KEXEC=y
CONFIG_EFI_VARS=y
CONFIG_BINFMT_MISC=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/configs/zx1_defconfig
Expand Up @@ -12,7 +12,6 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_IA64_MCA_RECOVERY=y
CONFIG_IA64_PALINFO=y
CONFIG_CRASH_DUMP=y
CONFIG_EFI_VARS=y
CONFIG_BINFMT_MISC=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
Expand Down
1 change: 0 additions & 1 deletion arch/x86/configs/i386_defconfig
Expand Up @@ -135,7 +135,6 @@ CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DEBUG_DEVRES=y
CONFIG_CONNECTOR=y
CONFIG_EFI_VARS=y
CONFIG_EFI_CAPSULE_LOADER=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_VIRTIO_BLK=y
Expand Down
1 change: 0 additions & 1 deletion arch/x86/configs/x86_64_defconfig
Expand Up @@ -134,7 +134,6 @@ CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DEBUG_DEVRES=y
CONFIG_CONNECTOR=y
CONFIG_EFI_VARS=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_VIRTIO_BLK=y
CONFIG_BLK_DEV_SD=y
Expand Down
12 changes: 0 additions & 12 deletions drivers/firmware/efi/Kconfig
Expand Up @@ -2,18 +2,6 @@
menu "EFI (Extensible Firmware Interface) Support"
depends on EFI

config EFI_VARS
tristate "EFI Variable Support via sysfs"
depends on EFI && (X86 || IA64)
default n
help
If you say Y here, you are able to get EFI (Extensible Firmware
Interface) variable information via sysfs. You may read,
write, create, and destroy EFI variables through this interface.
Note that this driver is only retained for compatibility with
legacy users: new users should use the efivarfs filesystem
instead.

config EFI_ESRT
bool
depends on EFI && !IA64
Expand Down
1 change: 0 additions & 1 deletion drivers/firmware/efi/Makefile
Expand Up @@ -17,7 +17,6 @@ ifneq ($(CONFIG_EFI_CAPSULE_LOADER),)
obj-$(CONFIG_EFI) += capsule.o
endif
obj-$(CONFIG_EFI_PARAMS_FROM_FDT) += fdtparams.o
obj-$(CONFIG_EFI_VARS) += efivars.o
obj-$(CONFIG_EFI_ESRT) += esrt.o
obj-$(CONFIG_EFI_VARS_PSTORE) += efi-pstore.o
obj-$(CONFIG_UEFI_CPER) += cper.o
Expand Down

0 comments on commit 0f5b2c6

Please sign in to comment.