diff --git a/edk2-NetworkPkg-DxeNetLib-Reword-PseudoRandom-error-loggi.patch b/edk2-NetworkPkg-DxeNetLib-Reword-PseudoRandom-error-loggi.patch new file mode 100644 index 0000000..415a914 --- /dev/null +++ b/edk2-NetworkPkg-DxeNetLib-Reword-PseudoRandom-error-loggi.patch @@ -0,0 +1,43 @@ +From c5f142e26ea5e892a63ed35ca952c8b583a9f8c1 Mon Sep 17 00:00:00 2001 +From: Oliver Steffen +Date: Wed, 14 Aug 2024 09:53:49 +0200 +Subject: [PATCH 2/2] NetworkPkg/DxeNetLib: Reword PseudoRandom error logging + +RH-Author: Oliver Steffen +RH-MergeRequest: 67: NetworkPkg/DxeNetLib: adjust PseudoRandom error logging +RH-Jira: RHEL-45899 +RH-Commit: [2/2] 0d465ca0ea00598e6826446cd08e890c2ae4bea7 (osteffen/edk2) + +The word "Failed" is used when logging tired Rng algorithms. +These mostly non-critical messages confused some users. + +Reword it and also add a message confirming eventual success to +deescalate the importance somewhat. + +Signed-off-by: Oliver Steffen +--- + NetworkPkg/Library/DxeNetLib/DxeNetLib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c +index 4dfbe91a55..905a944975 100644 +--- a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c ++++ b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c +@@ -946,12 +946,13 @@ PseudoRandom ( + // + // Secure Algorithm was supported on this platform + // ++ DEBUG ((DEBUG_VERBOSE, "Generated random data using secure algorithm %d: %r\n", AlgorithmIndex, Status)); + return EFI_SUCCESS; + } else if (Status == EFI_UNSUPPORTED) { + // + // Secure Algorithm was not supported on this platform + // +- DEBUG ((DEBUG_VERBOSE, "Failed to generate random data using secure algorithm %d: %r\n", AlgorithmIndex, Status)); ++ DEBUG ((DEBUG_VERBOSE, "Unable to generate random data using secure algorithm %d not available: %r\n", AlgorithmIndex, Status)); + + // + // Try the next secure algorithm +-- +2.39.3 + diff --git a/edk2-NetworkPkg-DxeNetLib-adjust-PseudoRandom-error-loggi.patch b/edk2-NetworkPkg-DxeNetLib-adjust-PseudoRandom-error-loggi.patch new file mode 100644 index 0000000..18fb2ab --- /dev/null +++ b/edk2-NetworkPkg-DxeNetLib-adjust-PseudoRandom-error-loggi.patch @@ -0,0 +1,48 @@ +From 7cbd00792445ad50e861e4835cdb5ba60466aae3 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Wed, 19 Jun 2024 09:07:56 +0200 +Subject: [PATCH 1/2] NetworkPkg/DxeNetLib: adjust PseudoRandom error logging + +RH-Author: Oliver Steffen +RH-MergeRequest: 67: NetworkPkg/DxeNetLib: adjust PseudoRandom error logging +RH-Jira: RHEL-45899 +RH-Commit: [1/2] 15135d672cef4310cb29f8a55146f36b2ee1f15d (osteffen/edk2) + +There is a list of allowed rng algorithms, if /one/ of them is not +supported this is not a problem, only /all/ of them failing is an +error condition. + +Downgrade the message for a single unsupported algorithm from ERROR to +VERBOSE. Add an error message in case we finish the loop without +finding a supported algorithm. + +Signed-off-by: Gerd Hoffmann +(cherry picked from commit 6862b9d538d96363635677198899e1669e591259) +--- + NetworkPkg/Library/DxeNetLib/DxeNetLib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c +index 01c13c08d2..4dfbe91a55 100644 +--- a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c ++++ b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c +@@ -951,7 +951,7 @@ PseudoRandom ( + // + // Secure Algorithm was not supported on this platform + // +- DEBUG ((DEBUG_ERROR, "Failed to generate random data using secure algorithm %d: %r\n", AlgorithmIndex, Status)); ++ DEBUG ((DEBUG_VERBOSE, "Failed to generate random data using secure algorithm %d: %r\n", AlgorithmIndex, Status)); + + // + // Try the next secure algorithm +@@ -971,6 +971,7 @@ PseudoRandom ( + // If we get here, we failed to generate random data using any secure algorithm + // Platform owner should ensure that at least one secure algorithm is supported + // ++ DEBUG ((DEBUG_ERROR, "Failed to generate random data, no supported secure algorithm found\n")); + ASSERT_EFI_ERROR (Status); + return Status; + } +-- +2.39.3 + diff --git a/edk2.spec b/edk2.spec index 74db305..622e601 100644 --- a/edk2.spec +++ b/edk2.spec @@ -21,7 +21,7 @@ ExclusiveArch: x86_64 aarch64 Name: edk2 Version: %{GITDATE} -Release: 2%{?dist} +Release: 3%{?dist} Summary: UEFI firmware for 64-bit virtual machines License: BSD-2-Clause-Patent and Apache-2.0 and MIT URL: http://www.tianocore.org @@ -91,6 +91,10 @@ Patch37: 0039-CryptoPkg-Test-call-ProcessLibraryConstructorList.patch Patch38: 0040-MdePkg-X86UnitTestHost-set-rdrand-cpuid-bit.patch # For RHEL-43442 - edk2 disconnects abnormally before loading the kernel Patch39: edk2-MdeModulePkg-Warn-if-out-of-flash-space-when-writing.patch +# For RHEL-45899 - [RHEL-9.5.0] edk2 hit Failed to generate random data +Patch40: edk2-NetworkPkg-DxeNetLib-adjust-PseudoRandom-error-loggi.patch +# For RHEL-45899 - [RHEL-9.5.0] edk2 hit Failed to generate random data +Patch41: edk2-NetworkPkg-DxeNetLib-Reword-PseudoRandom-error-loggi.patch # python3-devel and libuuid-devel are required for building tools. # python3-devel is also needed for varstore template generation and @@ -425,6 +429,12 @@ install -m 0644 \ %changelog +* Tue Aug 20 2024 Miroslav Rezanina - 20240524-3 +- edk2-NetworkPkg-DxeNetLib-adjust-PseudoRandom-error-loggi.patch [RHEL-45899] +- edk2-NetworkPkg-DxeNetLib-Reword-PseudoRandom-error-loggi.patch [RHEL-45899] +- Resolves: RHEL-45899 + ([RHEL-9.5.0] edk2 hit Failed to generate random data) + * Thu Jul 25 2024 Miroslav Rezanina - 20240524-2 - edk2-MdeModulePkg-Warn-if-out-of-flash-space-when-writing.patch [RHEL-43442] - Resolves: RHEL-43442