From: "Zeng, Star" <star.zeng@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
Amit Kumar <amit.ak@samsung.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Tian, Feng" <feng.tian@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
"Gabriel L. Somlo (GMail)" <gsomlo@gmail.com>,
"Fan, Jeff" <jeff.fan@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH V4] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol
Date: Tue, 27 Jun 2017 00:52:53 +0000 [thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8ED8A7@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <b9175edc-b917-d929-9ce3-8bd0b8379a4c@redhat.com>
Laszlo,
I agree to revert this patch first since it breaks something.
Could you help do that with detailed revert log?
Anyway, have you found any bug in this patch itself?
Thanks,
Star
-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com]
Sent: Tuesday, June 27, 2017 8:47 AM
To: Amit Kumar <amit.ak@samsung.com>; edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Zeng, Star <star.zeng@intel.com>; Gabriel L. Somlo (GMail) <gsomlo@gmail.com>; Fan, Jeff <jeff.fan@intel.com>
Subject: Re: [edk2] [PATCH V4] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol
On 06/23/17 12:09, Amit Kumar wrote:
> Change since v3:
> 1) Fixed issue when Attributes = EFI_OPEN_PROTOCOL_TEST_PROTOCOL and
> Inteface = NULL case. [Reported by:star.zeng at intel.com]
>
> Change Since v2:
> 1) Modified to use EFI_ERROR to get status code
>
> Change since v1:
> 1) Fixed typo protocal to protocol
> 2) Fixed coding style
>
> Modified source code to update Interface as per spec.
> 1) In case of Protocol is un-supported, interface should be returned NULL.
> 2) In case of any error, interface should not be modified.
> 3) In case of Test Protocol, interface is optional.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Amit Kumar <amit.ak@samsung.com>
> ---
> MdeModulePkg/Core/Dxe/Hand/Handle.c | 26 ++++++++++++++------------
> 1 file changed, 14 insertions(+), 12 deletions(-)
This patch breaks *at least* the following drivers:
- IntelFrameworkModulePkg/.../IsaBusDxe
- IntelFrameworkModulePkg/.../IsaSerialDxe
- MdeModulePkg/.../TerminalDxe
- MdeModulePkg/.../ScsiBusDxe
I have patches for the first three. I'm too tired to complete the patch for the fourth module (and any modules that might still be affected, but I'd only see those in the OVMF boot process if I got past the ScsiBusDxe
problem.)
The issue was reported by Gabriel here:
https://lists.01.org/pipermail/edk2-devel/2017-June/011886.html
although he didn't get past of the first driver, of course.
Now, what this patch does is valid, as far as the UEFI spec is concerned. And the above (now broken) drivers are all incorrect to assume that EFI_ALREADY_STARTED guarantees that OpenProtocol() has filled in Interface on output.
However, such an intrusive fix must be accompanied by extensive testing; preferably using one of the in-tree emulation platforms, such as OvmfPkg running on QEMU. And, when testing uncovers the failures in those drivers, patches should be submitted to fix those drivers *first*, and then the patch for OpenProtocol() should be presented *last*.
I'm attaching the first three patches I have now. As I said I'm too tired to work on ScsiBusDxe (the SCSIBusDriverBindingStart() function has the same bug around EFI_ALREADY_STARTED). Which is why I'm not posting the first three patches normally, with git-send-email; the work is incomplete.
Honestly, I'm thinking that commit 45cfcd8dccf8 should be reverted now, then all the drivers used by OvmfPkg should be fixed up (not by me, obviously!), and once OVMF boots again, we can re-commit (= cherry-pick) commit 45cfcd8dccf8.
Thanks
Laszlo
next prev parent reply other threads:[~2017-06-27 0:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170623100913epcas5p3a10353593d6348b5bf3c890e2deaadb7@epcas5p3.samsung.com>
2017-06-23 10:09 ` [PATCH V4] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol Amit Kumar
2017-06-26 1:19 ` Zeng, Star
2017-06-26 2:46 ` Zeng, Star
2017-06-27 0:47 ` Laszlo Ersek
2017-06-27 0:52 ` Zeng, Star [this message]
2017-06-27 1:37 ` Zeng, Star
2017-06-27 9:44 ` Laszlo Ersek
2017-06-27 9:59 ` Zeng, Star
2017-06-27 11:15 ` Laszlo Ersek
2017-06-27 13:23 ` Laszlo Ersek
2017-06-27 13:31 ` Zeng, Star
2017-06-28 9:34 ` Zeng, Star
2017-06-28 12:39 ` Laszlo Ersek
2017-06-28 13:00 ` Zeng, Star
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=0C09AFA07DD0434D9E2A0C6AEB0483103B8ED8A7@shsmsx102.ccr.corp.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