From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D6EF3AC13A8 for ; Mon, 4 Mar 2024 15:18:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ayiVnUn3hmRrAFT5jz53Knc/tnQw2rbcITHQ6Sp9aoY=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1709565500; v=1; b=lxJugiqk2nXQYuLVu3iVnwdh2/6M97/lqjXo4oollZej45cBNpWyioWufJIBcAA7mzzvgXf4 Tl0qlvsrR6VxwTHaa+ZYtH4nFKnCLTzH29rp++GYwpWhEj/Ks54nM32DLnZOjs+pt5BXa+nZScP 4QP3dVnOgFOwoKAJyk3cDQmQ= X-Received: by 127.0.0.2 with SMTP id 89w2YY7687511xW2qUi27a6G; Mon, 04 Mar 2024 07:18:20 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.101340.1709565499630456163 for ; Mon, 04 Mar 2024 07:18:19 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-672-rgoxOJcCPAKTHlRRpmI-Ww-1; Mon, 04 Mar 2024 10:18:15 -0500 X-MC-Unique: rgoxOJcCPAKTHlRRpmI-Ww-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B17D02806409; Mon, 4 Mar 2024 15:18:14 +0000 (UTC) X-Received: from osteffen-laptop.redhat.com (unknown [10.39.195.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 23E32440F1; Mon, 4 Mar 2024 15:18:13 +0000 (UTC) From: "Oliver Steffen" To: devel@edk2.groups.io Cc: Oliver Steffen , Bob Feng , Liming Gao , Rebecca Cran , Yuwei Chen , Gerd Hoffmann , Laszlo Ersek Subject: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of flash space when writing variables Date: Mon, 4 Mar 2024 16:18:03 +0100 Message-ID: <20240304151805.129004-2-osteffen@redhat.com> In-Reply-To: <20240304151805.129004-1-osteffen@redhat.com> References: <20240304151805.129004-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,osteffen@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: S7Iu6EMorZaleIDMqSgjUaivx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=lxJugiqk; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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. Cc: Bob Feng Cc: Gerd Hoffmann Cc: Laszlo Ersek Cc: Liming Gao Cc: Rebecca Cran Cc: Yuwei Chen 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/MdeMod= ulePkg/Universal/Variable/RuntimeDxe/Variable.c index d394d237a53f..1c7659031dc5 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 =3D=3D EFI_OUT_OF_RESOURCES) { + DEBUG ((DEBUG_WARN, "UpdateVariable failed: Out of flash space\n")); } =20 return Status; --=20 2.44.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116321): https://edk2.groups.io/g/devel/message/116321 Mute This Topic: https://groups.io/mt/104723945/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-