From: Greg KH <greg@kroah.com>
To: "Mario Limonciello (AMD)" <superm1@kernel.org>
Cc: stable@vger.kernel.org, Anisse Astier <an.astier@criteo.com>,
Ard Biesheuvel <ardb@kernel.org>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [PATCH 6.1.y] efivarfs: expose used and total size
Date: Tue, 14 Jul 2026 06:58:18 +0200 [thread overview]
Message-ID: <2026071408-vividness-saga-4987@gregkh> (raw)
In-Reply-To: <20260714043329.3510162-1-superm1@kernel.org>
On Mon, Jul 13, 2026 at 11:33:29PM -0500, Mario Limonciello (AMD) wrote:
> From: Anisse Astier <an.astier@criteo.com>
>
> 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>
> (cherry-picked from d86ff3333cb1 ("efivarfs: expose used and total size"))
> Adjusted for headers in linux-6.1.y
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> Cc:Steve McIntyre <steve@einval.com>
> Cc:Richard Hughes <richard@hughsie.com>
>
> Background for this backport is that fwupd needs to be able to do CA
> updates on Debian oldstable (bookworm) which tracks 6.1.7. The CA update
> process checks for free storage, and needs this function to do it.
What is the git id of this commit?
next prev parent reply other threads:[~2026-07-14 4:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 4:33 [PATCH 6.1.y] efivarfs: expose used and total size Mario Limonciello (AMD)
2026-07-14 4:58 ` Greg KH [this message]
2026-07-14 5:03 ` Mario Limonciello
2026-07-14 5:19 ` Greg KH
2026-07-15 0:12 ` Sasha Levin
2026-07-15 1:21 ` Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026071408-vividness-saga-4987@gregkh \
--to=greg@kroah.com \
--cc=an.astier@criteo.com \
--cc=ardb@kernel.org \
--cc=mario.limonciello@amd.com \
--cc=stable@vger.kernel.org \
--cc=superm1@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox