From: "Maciej Rabeda" <maciej.rabeda@linux.intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
devel@edk2.groups.io, michael.kubacki@outlook.com
Cc: Siyuan Fu <siyuan.fu@intel.com>, Jiaxin Wu <jiaxin.wu@intel.com>,
"Tomas Pilar (tpilar)" <tpilar@solarflare.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK
Date: Thu, 16 Apr 2020 17:25:17 +0200 [thread overview]
Message-ID: <83bd9a4c-aeaf-c247-207d-027721f1cc4d@linux.intel.com> (raw)
In-Reply-To: <44e4dac1-e4b3-e158-e291-3f9776235599@redhat.com>
Laszlo,
Thanks for the very thorough analysis - this is why I have called you
out specifically :)
I will file a bug against SnpDxe EBS for bookkeeping.
Might end up as "won't fix" or "invalid", but a bit more time has to be
spent to address it correctly.
Michael,
For your patch.
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Thanks,
Maciej
On 15-Apr-20 18:40, Laszlo Ersek wrote:
> On 04/15/20 18:25, Laszlo Ersek wrote:
>
>> In other words, I personally believe that bug#1974 should have been
>> closed as INVALID (without patching the edk2 source). The EBS handler in
>> SnpDxe is necessary (as long as it does not alter the UEFI memory map
>> itself), because sending the Shutdown CDB at EBS *is* needed, and the
>> UNDI-providing agent that processes the Shutdown CDB *cannot* release
>> UEFI-owned memory.
> For the patch that's being proposed in this thread:
>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
> However, there *is* a bug in SnpNotifyExitBootServices(). Namely, it
> calls PxeShutdown(), and PxeShutdown() does two things:
>
> (a) it sends the Shutdown CDB,
> (b) it calls Snp->PciIo->FreeBuffer().
>
> Step (a) is required in the EBS handler context.
>
> Step (b) is *forbidden* in the EBS handler context.
>
> Therefore, the cut must be made *between* steps (a) and (b).
>
> PxeShutdown() is alright to call from SimpleNetworkDriverStop(), but it
> is *not* fit for an EBS handler.
>
> (SnpNotifyExitBootServices() also calls PxeStop(). I'm not sure if that
> is really necessary, but at least PxeStop() only sends a CDB to UNDI,
> and manipulates "Snp->Mode.State". Those actions do not interfere with
> the UEFI memmap, so they are harmless in this aspect.)
>
> "in my opinion", as always :)
>
> Thanks,
> Laszlo
>
next prev parent reply other threads:[~2020-04-16 15:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 18:16 [PATCH v1 1/1] NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK Michael Kubacki
2020-04-14 9:59 ` Maciej Rabeda
2020-04-14 17:08 ` Michael Kubacki
2020-04-15 9:45 ` [edk2-devel] " Maciej Rabeda
2020-04-15 16:25 ` Laszlo Ersek
2020-04-15 16:40 ` Laszlo Ersek
2020-04-16 15:25 ` Maciej Rabeda [this message]
2020-04-16 16:12 ` Andrew Fish
2020-04-20 9:25 ` 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=83bd9a4c-aeaf-c247-207d-027721f1cc4d@linux.intel.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