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 2D39BAC13C7 for ; Mon, 4 Mar 2024 15:18:31 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=pJ9wpy9t2JCwsCzskuQ2s5d2w/BRZZIe8wdkQ6p+zlk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID: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=1709565509; v=1; b=pPMuL57BJw+8emx9sMjBDoCLRAhxuVsJkGwQUYm5QU6LbXvqZ/mlXP7d8j7sF+XON8/+fn4D uTs0950DykQL7KCj7dhhEoOs74PHT1Qd0aiOe+2mnSgmnl9qATrhyH1xlniqqddH5QamlrRJGXN vw6J0xv6lPVX2ovRb0quwAjQ= X-Received: by 127.0.0.2 with SMTP id IEylYY7687511xE9d1FxeZeM; Mon, 04 Mar 2024 07:18:29 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.101490.1709565509122866526 for ; Mon, 04 Mar 2024 07:18: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-625-a9zDV738NdeOA7AAEghK9A-1; Mon, 04 Mar 2024 10:18:18 -0500 X-MC-Unique: a9zDV738NdeOA7AAEghK9A-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 E2F4A108BE0A; Mon, 4 Mar 2024 15:18:12 +0000 (UTC) X-Received: from osteffen-laptop.redhat.com (unknown [10.39.195.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 060A739D3E; Mon, 4 Mar 2024 15:18:10 +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 0/1] MdeModulePkg: Warn if out of flash space when writing variables Date: Mon, 4 Mar 2024 16:18:02 +0100 Message-ID: <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: Jz0QXqinXGOgh7EcfRSyjyFwx7686176AA= Content-Transfer-Encoding: 8bit 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=pPMuL57B; 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 quickly. Launching OVMF with a full variable store then looks like this (Debug Output): [...] CommonVariableSpace = 0x3FF9C - CommonVariableTotalSize = 0x3FF60 UpdateVariable failed: Out of flash space Select Item: 0xE Select Item: 0x19 RecordVarErrorFlag (0xEF) Timeout:8BE4DF61-93CA-11D2-AA0D-00E098032B8C - 0x00000007 - 0x4E CommonVariableSpace = 0x3FF9C - CommonVariableTotalSize = 0x3FF60 UpdateVariable failed: Out of flash space PlatformBootManagerBeforeConsole: SetVariable(Timeout, 3): Out of Resources RecordVarErrorFlag (0xEF) BootOrder:8BE4DF61-93CA-11D2-AA0D-00E098032B8C - 0x00000007 - 0x52 CommonVariableSpace = 0x3FF9C - CommonVariableTotalSize = 0x3FF60 UpdateVariable failed: Out of flash space ASSERT_EFI_ERROR (Status = Out of Resources) ASSERT /home/osteffen/work/firmware/edk2/edk2/edk2/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c(361): !(((INTN)(RETURN_STATUS)(Status)) < 0) PR: https://github.com/tianocore/edk2/pull/5435 Cc: Bob Feng Cc: Gerd Hoffmann Cc: Laszlo Ersek Cc: Liming Gao Cc: Rebecca Cran Cc: Yuwei Chen Oliver Steffen (1): MdeModulePkg: Warn if out of flash space when writing variables MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.44.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116322): https://edk2.groups.io/g/devel/message/116322 Mute This Topic: https://groups.io/mt/104723951/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-