[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/2] Minimise writes to EFI variable storage

From: Colin Watson
Subject: [PATCH v2 0/2] Minimise writes to EFI variable storage
Date: Fri, 22 Mar 2019 23:30:13 +0000
User-agent: NeoMutt/20170113 (1.7.2)

Some UEFI firmware is easily provoked into running out of space in its
variable storage.  This is usually due to certain kernel drivers (e.g.
pstore), but regardless of the cause it can cause grub-install to fail
because it currently asks efibootmgr to delete and re-add entries, and
the deletion often doesn't result in an immediate garbage collection.
Writing variables frequently also increases wear on the NVRAM which may
have limited write cycles.  For these reasons, it's desirable to find a
way to minimise writes while still allowing grub-install to ensure that
a suitable boot entry exists.

This short patch series does so by using the efivar and efiboot
libraries directly.

v2: simplify grub_lltoa; use free_efi_variable in more error paths

Colin Watson (2):
  Add %X to grub_vsnprintf_real and friends
  Minimise writes to EFI variable storage

 INSTALL                         |   5 +
 Makefile.util.def               |  20 ++                    |  12 +
 grub-core/kern/misc.c           |   7 +-
 grub-core/osdep/efivar.c        |   3 +
 grub-core/osdep/unix/efivar.c   | 503 ++++++++++++++++++++++++++++++++
 grub-core/osdep/unix/platform.c | 100 +------
 include/grub/util/install.h     |   5 +
 util/grub-install.c             |   4 +-
 9 files changed, 562 insertions(+), 97 deletions(-)
 create mode 100644 grub-core/osdep/efivar.c
 create mode 100644 grub-core/osdep/unix/efivar.c


reply via email to

[Prev in Thread] Current Thread [Next in Thread]