Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Greg KH <greg@kroah.com>
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 00:03:19 -0500	[thread overview]
Message-ID: <3ea09dad-9688-4f50-9939-059b8c6177fc@kernel.org> (raw)
In-Reply-To: <2026071408-vividness-saga-4987@gregkh>



On 7/13/26 11:58 PM, Greg KH wrote:
> 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?

Oh I mentioned it above between Ard's S-o-b and mine:

d86ff3333cb1 ("efivarfs: expose used and total size")

  reply	other threads:[~2026-07-14  5:03 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
2026-07-14  5:03   ` Mario Limonciello [this message]
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=3ea09dad-9688-4f50-9939-059b8c6177fc@kernel.org \
    --to=superm1@kernel.org \
    --cc=an.astier@criteo.com \
    --cc=ardb@kernel.org \
    --cc=greg@kroah.com \
    --cc=mario.limonciello@amd.com \
    --cc=stable@vger.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