public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: devel@edk2.groups.io, Laszlo Ersek <lersek@redhat.com>,
	 Jiewen Yao <jiewen.yao@intel.com>,
	oliver@redhat.com
Subject: Re: [edk2-devel] [PATCH 4/4] OvmfPkg/VirtNorFlashDxe: ValidateFvHeader: unwritten state is EOL too
Date: Fri, 12 Jan 2024 13:41:22 +0100	[thread overview]
Message-ID: <uqs6ixkjn55i7tp4ebnck7ih4fmafmgleocprvh74pkhqkq5qs@7hcwhpqt7rjr> (raw)
In-Reply-To: <CAMj1kXH9mUUeAE_YaOz+ZE0FMmCmn-r4+xGk3crikRZ0yLBtdw@mail.gmail.com>

On Fri, Jan 12, 2024 at 01:16:47PM +0100, Ard Biesheuvel wrote:
> On Fri, 12 Jan 2024 at 12:38, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > It is possible to find variable entries with State being 0xff,
> > i.e. not updated since flash block erase.   This indicates the
> > header write was not completed (and therefore State was not set
> > to VAR_HEADER_VALID_ONLY).  Treat this as additional "end of
> > variable list" condition.
> >
> 
> Why?

This can happen only at the end of the variable list, when the variable
driver tried to append a new entry but was interrupted early.

Also without a valid header you don't have NameSize and DataSize.  So
you can't calculate the size of the entry to continue following the
chain.

take care,
  Gerd



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



  reply	other threads:[~2024-01-12 12:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 11:37 [edk2-devel] [PATCH 0/4] OvmfPkg/VirtNorFlashDxe: fix corruption + misc small improvements Gerd Hoffmann
2024-01-12 11:37 ` [edk2-devel] [PATCH 1/4] OvmfPkg/VirtNorFlashDxe: fix shadowbuffer reads Gerd Hoffmann
2024-01-12 12:11   ` Ard Biesheuvel
2024-01-12 11:37 ` [edk2-devel] [PATCH 2/4] OvmfPkg/VirtNorFlashDxe: clarify block write logic Gerd Hoffmann
2024-01-12 12:14   ` Ard Biesheuvel
2024-01-12 11:37 ` [edk2-devel] [PATCH 3/4] OvmfPkg/VirtNorFlashDxe: allow larger writes without block erase Gerd Hoffmann
2024-01-12 12:15   ` Ard Biesheuvel
2024-01-12 11:37 ` [edk2-devel] [PATCH 4/4] OvmfPkg/VirtNorFlashDxe: ValidateFvHeader: unwritten state is EOL too Gerd Hoffmann
2024-01-12 12:16   ` Ard Biesheuvel
2024-01-12 12:41     ` Gerd Hoffmann [this message]
2024-01-15 10:21 ` [edk2-devel] [PATCH 0/4] OvmfPkg/VirtNorFlashDxe: fix corruption + misc small improvements Laszlo Ersek
2024-01-15 12:38   ` Laszlo Ersek
2024-01-15 17:56   ` Ard Biesheuvel
2024-01-16  9:37     ` Laszlo Ersek
2024-01-16 10:21       ` Ard Biesheuvel

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=uqs6ixkjn55i7tp4ebnck7ih4fmafmgleocprvh74pkhqkq5qs@7hcwhpqt7rjr \
    --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