1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/fs/efivarfs
James Bottomley fc20737d8b efivarfs: allow creation of zero length files
Temporarily allow the creation of zero length files in efivarfs so the
'fwupd' user space firmware update tool can continue to operate. This
hack should be reverted as soon as the fwupd mechanisms for updating
firmware have been fixed.

fwupd has been coded to open a firmware file, close it, remove the
immutable bit and write to it.  Since commit 908af31f48 ("efivarfs:
fix error on write to new variable leaving remnants") this behaviour
results in the first close removing the file which causes the second
write to fail.  To allow fwupd to keep working code up an indicator of
size 1 if a write fails and only remove the file on that condition (so
create at zero size is allowed).

Tested-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
[ardb: replace LVFS with fwupd, as suggested by Richard]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-02-27 11:27:49 +01:00
..
file.c efivarfs: allow creation of zero length files 2025-02-27 11:27:49 +01:00
inode.c Merge branch 'efivarfs' into next 2025-01-19 17:50:58 +01:00
internal.h efivarfs: add variable resync after hibernation 2025-01-22 13:28:17 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile efi: vars: Move efivar caching layer into efivarfs 2022-06-24 20:40:19 +02:00
super.c efivarfs: Defer PM notifier registration until .fill_super 2025-02-23 17:30:05 +01:00
vars.c efivarfs: add variable resync after hibernation 2025-01-22 13:28:17 +01:00