From: "Oliver Steffen" <osteffen@redhat.com>
To: devel@edk2.groups.io
Cc: Oliver Steffen <osteffen@redhat.com>,
Bob Feng <bob.c.feng@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Laszlo Ersek <lersek@redhat.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Rahul Kumar <rahul1.kumar@intel.com>,
Rebecca Cran <rebecca@bsdio.com>,
Yuwei Chen <yuwei.chen@intel.com>
Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Warn if out of space when writing variables
Date: Mon, 15 Apr 2024 21:46:37 +0200 [thread overview]
Message-ID: <20240415194637.276959-2-osteffen@redhat.com> (raw)
In-Reply-To: <20240415194637.276959-1-osteffen@redhat.com>
Emit a DEBUG_ERROR message if there is not enough flash variable left to
write/update a variable. This condition is currently not logged
appropriately in all cases, given that full variable store can easily
render the system unbootable.
This new message helps identifying this condition.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index d394d237a53f..97317270c4a7 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -2364,6 +2364,8 @@ UpdateVariable (
);
ASSERT_EFI_ERROR (Status);
}
+ } else if (Status == EFI_OUT_OF_RESOURCES) {
+ DEBUG ((DEBUG_ERROR, "UpdateVariable failed: Out of variable space\n"));
}
return Status;
--
2.44.0
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117804): https://edk2.groups.io/g/devel/message/117804
Mute This Topic: https://groups.io/mt/105543779/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-04-15 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 19:46 [edk2-devel] [PATCH v2 0/1] MdeModulePkg: Warn if out of space when writing variables Oliver Steffen
2024-04-15 19:46 ` Oliver Steffen [this message]
2024-04-16 7:36 ` [edk2-devel] [PATCH v2 1/1] " Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2024-05-10 14:35 [edk2-devel] [PATCH v2 0/1] " Oliver Steffen
2024-05-10 14:42 ` [edk2-devel] [PATCH v2 1/1] " Oliver Steffen
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-list 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=20240415194637.276959-2-osteffen@redhat.com \
--to=devel@edk2.groups.io \
/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