From 641da27ad73e8f09c40e8b093dcf824c0ee4d02a Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 1 Aug 2024 14:44:22 +0000 Subject: automatic import of edk2 --- ...g-Warn-if-out-of-flash-space-when-writing.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 edk2-MdeModulePkg-Warn-if-out-of-flash-space-when-writing.patch (limited to 'edk2-MdeModulePkg-Warn-if-out-of-flash-space-when-writing.patch') diff --git a/edk2-MdeModulePkg-Warn-if-out-of-flash-space-when-writing.patch b/edk2-MdeModulePkg-Warn-if-out-of-flash-space-when-writing.patch new file mode 100644 index 0000000..2198b6f --- /dev/null +++ b/edk2-MdeModulePkg-Warn-if-out-of-flash-space-when-writing.patch @@ -0,0 +1,43 @@ +From 880c1ca7420b873c5f81563b122d7bd1ebad72cb Mon Sep 17 00:00:00 2001 +From: Oliver Steffen +Date: Mon, 4 Mar 2024 15:32:58 +0100 +Subject: [PATCH] MdeModulePkg: Warn if out of flash space when writing + variables + +RH-Author: Oliver Steffen +RH-MergeRequest: 64: MdeModulePkg: Warn if out of flash space when writing variables +RH-Jira: RHEL-43442 +RH-Acked-by: Gerd Hoffmann +RH-Commit: [1/1] b65130800090192f47f13d67ff14f902a4f5bfb5 (osteffen/edk2) + +Emit a DEBUG_WARN message if there is not enough flash space 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. + +Signed-off-by: Oliver Steffen +Reviewed-by: Laszlo Ersek +Reviewed-by: Gerd Hoffmann +(cherry picked from commit 80b59ff8320d1bd134bf689fe9c0ddf4e0473b88) +Signed-off-by: Oliver Steffen +--- + 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 d394d237a5..1c7659031d 100644 +--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c ++++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +@@ -2364,6 +2364,8 @@ Done: + ); + ASSERT_EFI_ERROR (Status); + } ++ } else if (Status == EFI_OUT_OF_RESOURCES) { ++ DEBUG ((DEBUG_WARN, "UpdateVariable failed: Out of flash space\n")); + } + + return Status; +-- +2.39.3 + -- cgit v1.2.3