public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, osteffen@redhat.com
Cc: 'Bob Feng' <bob.c.feng@intel.com>,
	'Rebecca Cran' <rebecca@bsdio.com>,
	'Yuwei Chen' <yuwei.chen@intel.com>,
	'Gerd Hoffmann' <kraxel@redhat.com>
Subject: Re: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of flash space when writing variables
Date: Tue, 5 Mar 2024 08:33:57 +0100	[thread overview]
Message-ID: <6fd2dded-3b45-100e-605a-653de6d1b257@redhat.com> (raw)
In-Reply-To: <004401da6e95$ac5d9e90$0518dbb0$@byosoft.com.cn>

On 3/5/24 01:40, gaoliming via groups.io wrote:
> Oliver:
>   If there is no enough space, Variable driver will reclaim flash and
> reserve the enough space at boot time. 

What if the flash is genuinely fully occupied by *live* non-volatile
variables?

Laszlo

>   At the runtime, reclaim will not be trigged. The space may be out of
> resource. The warning message may be reported. Is this your case?
> 
> Thanks
> Liming
>> -----邮件原件-----
>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Oliver Steffen
>> 发送时间: 2024年3月4日 23:18
>> 收件人: devel@edk2.groups.io
>> 抄送: Oliver Steffen <osteffen@redhat.com>; Bob Feng
>> <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Rebecca
>> Cran <rebecca@bsdio.com>; Yuwei Chen <yuwei.chen@intel.com>; Gerd
>> Hoffmann <kraxel@redhat.com>; Laszlo Ersek <lersek@redhat.com>
>> 主题: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of flash space
>> when writing variables
>>
>> 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 <bob.c.feng@intel.com>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: Laszlo Ersek <lersek@redhat.com>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> Cc: Rebecca Cran <rebecca@bsdio.com>
>> Cc: Yuwei Chen <yuwei.chen@intel.com>
>>
>> Signed-off-by: Oliver Steffen <osteffen@redhat.com>
>> ---
>>  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 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 == EFI_OUT_OF_RESOURCES) {
>>
>> +    DEBUG ((DEBUG_WARN, "UpdateVariable failed: Out of flash
>> space\n"));
>>
>>    }
>>
>>
>>
>>    return Status;
>>
>> --
>> 2.44.0
>>
>>
>>
>>
>>
> 
> 
> 
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116354): https://edk2.groups.io/g/devel/message/116354
Mute This Topic: https://groups.io/mt/104735640/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-03-05  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 15:18 [edk2-devel] [PATCH v1 0/1] MdeModulePkg: Warn if out of flash space when writing variables Oliver Steffen
2024-03-04 15:18 ` [edk2-devel] [PATCH v1 1/1] " Oliver Steffen
2024-03-04 17:26   ` Laszlo Ersek
2024-03-05  0:40   ` 回复: " gaoliming via groups.io
2024-03-05  7:33     ` Laszlo Ersek [this message]
2024-03-05 12:44       ` Oliver Steffen
2024-03-05 14:34         ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6fd2dded-3b45-100e-605a-653de6d1b257@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox