linux/drivers/firmware
Anisse Astier d86ff3333c efivarfs: expose used and total size
When writing EFI variables, one might get errors with no other message
on why it fails. Being able to see how much is used by EFI variables
helps analyzing such issues.

Since this is not a conventional filesystem, block size is intentionally
set to 1 instead of PAGE_SIZE.

x86 quirks of reserved size are taken into account; so that available
and free size can be different, further helping debugging space issues.

With this patch, one can see the remaining space in EFI variable storage
via efivarfs, like this:

   $ df -h /sys/firmware/efi/efivars/
   Filesystem      Size  Used Avail Use% Mounted on
   efivarfs        176K  106K   66K  62% /sys/firmware/efi/efivars

Signed-off-by: Anisse Astier <an.astier@criteo.com>
[ardb: - rename efi_reserved_space() to efivar_reserved_space()
       - whitespace/coding style tweaks]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2023-05-17 18:21:34 +02:00
..
arm_ffa driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
arm_scmi Arm SCMI updates for v6.4 2023-04-17 17:38:42 +02:00
broadcom MIPS: BCM47XX: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:51 -07:00
cirrus firmware: cs_dsp: Add a debugfs entry containing control details 2023-04-03 12:15:28 +01:00
efi efivarfs: expose used and total size 2023-05-17 18:21:34 +02:00
google Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
imx firmware: imx: scu-pd: add missed lvds lpi2c and pwm power domains 2023-03-06 11:12:36 +08:00
meson firmware: meson_sm: populate platform devices from sm device tree data 2023-03-27 12:07:17 +02:00
psci firmware/psci: demote suspend-mode warning to info level 2023-04-14 13:48:56 +02:00
smccc irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4 2023-04-08 10:51:23 +01:00
tegra firmware: Use of_property_present() for testing DT property presence 2023-04-04 21:51:23 +02:00
xilinx Merge 6.3-rc3 into char-misc-next 2023-03-20 09:06:37 +01:00
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-07-04 14:28:42 +01:00
arm_sdei.c firmware: arm_sdei: Fix sleep from invalid context BUG 2023-03-28 15:21:35 +01:00
dmi_scan.c firmware: dmi: Fortify entry point length checks 2022-09-23 14:53:14 +02:00
dmi-id.c driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
dmi-sysfs.c firmware: dmi-sysfs: make kobj_type structures constant 2023-03-09 17:31:16 +01:00
edd.c edd: make kobj_type structure constant 2023-03-09 18:07:33 +01:00
iscsi_ibft_find.c iscsi_ibft: fix warning in reserve_ibft_region() 2021-08-05 19:47:57 -04:00
iscsi_ibft.c iscsi_ibft: Fix isa_bus_to_virt not working under ARM 2021-09-02 16:22:00 -04:00
Kconfig sound updates for 5.19-rc1 2022-05-25 16:55:16 -07:00
Makefile Follow-up tweaks for the EFI changes in v5.19 2022-06-03 13:39:30 -07:00
memmap.c firmware: memmap: use default_groups in kobj_type 2022-01-05 19:17:29 +01:00
mtk-adsp-ipc.c firmware: mediatek: Use meaningful names for mbox 2022-06-22 13:39:30 +01:00
pcdp.c
pcdp.h
qcom_scm-legacy.c firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ 2023-02-08 19:15:16 -08:00
qcom_scm-smc.c firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ 2023-02-08 19:15:16 -08:00
qcom_scm.c ARM: SoC drivers for v6.4 2023-04-25 12:02:16 -07:00
qcom_scm.h firmware: qcom: scm: Add wait-queue handling logic 2023-01-18 21:14:40 -06:00
qemu_fw_cfg.c firmware: qemu_fw_cfg: remove sysfs entries explicitly 2022-01-14 18:50:52 -05:00
raspberrypi.c Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
scpi_pm_domain.c firmware: arm_scpi: Fix string overflow in SCPI genpd driver 2021-12-13 15:17:37 +01:00
stratix10-rsu.c firmware: stratix10-rsu: extend RSU driver to get DCMF status 2022-07-14 16:55:09 +02:00
stratix10-svc.c firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe 2023-04-20 11:45:28 +02:00
sysfb_simplefb.c efi: sysfb_efi: Fix DMI quirks not working for simpledrm 2023-03-18 11:44:57 +01:00
sysfb.c efi: sysfb_efi: Fix DMI quirks not working for simpledrm 2023-03-18 11:44:57 +01:00
ti_sci.c firmware: ti_sci: Use devm_bitmap_zalloc when applicable 2022-11-03 21:45:10 -05:00
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c firmware: turris-mox-rwtm: make kobj_type structure constant 2023-04-07 17:17:00 +02:00