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 109D7740035 for ; Mon, 4 Mar 2024 17:26:30 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=DrDuXCDbcvRYOW1uaxe2r3JOW86lePh0eAMPOax1SOY=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1709573189; v=1; b=G/SDq5gWNj86RIeod0/+6/yBMyEAUAZqO34aO8Crk/iWeX/htu0JlK/pM4fdgix2oP1Ixt9u kDYaxGCZxPOwiNFq0a3eg+imHN+opjxKoKM/2t2YcR9XgEYefIFUZX6NaaVMUFblsGT9w9pCrAF B1VDPX0GF9J8AP9XaKazF8Dg= X-Received: by 127.0.0.2 with SMTP id hB5KYY7687511x2vyf0Xnynq; Mon, 04 Mar 2024 09:26:29 -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.587.1709573189019384928 for ; Mon, 04 Mar 2024 09:26:29 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-352-_MsZiKZeNuq4W7SC1uR0AQ-1; Mon, 04 Mar 2024 12:26:26 -0500 X-MC-Unique: _MsZiKZeNuq4W7SC1uR0AQ-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 2B7AD185A78B; Mon, 4 Mar 2024 17:26:26 +0000 (UTC) X-Received: from [10.39.192.26] (unknown [10.39.192.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 59D052026D06; Mon, 4 Mar 2024 17:26:24 +0000 (UTC) Message-ID: <9d2285df-ab9d-448f-05ad-7c1c9a820e0d@redhat.com> Date: Mon, 4 Mar 2024 18:26:23 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of flash space when writing variables To: Oliver Steffen , devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Rebecca Cran , Yuwei Chen , Gerd Hoffmann References: <20240304151805.129004-1-osteffen@redhat.com> <20240304151805.129004-2-osteffen@redhat.com> From: "Laszlo Ersek" In-Reply-To: <20240304151805.129004-2-osteffen@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: B4XHECNq9B5XdlKrE5pLNFgax7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="G/SDq5gW"; 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 On 3/4/24 16:18, Oliver Steffen wrote: > 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. >=20 > Cc: Bob Feng > Cc: Gerd Hoffmann > Cc: Laszlo Ersek > Cc: Liming Gao > Cc: Rebecca Cran > Cc: Yuwei Chen >=20 > Signed-off-by: Oliver Steffen > --- > MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeM= odulePkg/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; - I think DEBUG_ERROR is justified here, too. - Not sure if "flash" is a term that's appropriate for this driver. The function-top comment refers to "Variable region". But these are just superficial observations. Reviewed-by: Laszlo Ersek Laszlo -=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 (#116333): https://edk2.groups.io/g/devel/message/116333 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-