Re: [edk2] [Patch 3/4] NetworkPkg: Revert git 'eb213f2f' fix

2016-02-24 Thread Wu, Jiaxin
Thanks, Jordan. It's truly revert to the old one. I don't know whether we need to keep the copyright year unchanged or not. I'm fine for both of them. If no more opinion received, I will revise the copyright to the old one when commit the patch. Thanks. Jiaxin > -Original Message-

[edk2] [patch] ArmVirPkg: Add FileExplorerLib.inf to the dsc file

2016-02-24 Thread Dandan Bi
Because SecureBootConfigDxe use FileExplorerLib now, but FileExplorerLib is not in the dsc file of the package that use SecureBootConfigDxe. Now add it to pass build. Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Eric Dong

Re: [edk2] [PATCH] DuetPkg-PciBusNoEnumerationDxe: Fix stack overflow

2016-02-24 Thread Jordan Justen
On 2016-02-24 18:16:39, Leahy, Leroy P wrote: > When a PCI bridge is not enabled, the secondary bus may still be zero. > This causes an infinite recursive call to enumerate bus 0 which results in a > stack overflow. The easy fix is to have PciDevicePresent return > EFI_NOT_FOUND for devices

Re: [edk2] [PATCH] MdeModulePkg: Add ASSERT to make sure pointer 'MemoryMap' is not NULL.

2016-02-24 Thread Yao, Jiewen
Reviewed by: jiewen@intel.com -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Qiu Shumin Sent: Thursday, February 25, 2016 1:02 PM To: edk2-devel@lists.01.org Cc: Qiu, Shumin; Yao, Jiewen Subject: [edk2] [PATCH] MdeModulePkg: Add ASSERT to

Re: [edk2] [Patch 3/4] NetworkPkg: Revert git 'eb213f2f' fix

2016-02-24 Thread Jordan Justen
On 2016-02-24 20:22:14, Jiaxin Wu wrote: > 'eb213f2f' is associated with '3d0a49ad' commit. So, this patch is > used to respond the revert for '3d0a49ad' to adapt the Ipv4 config > policy update. > > Cc: Subramanian Sriram > Cc: El-Haj-Mahmoud Samer

[edk2] [PATCH v3] MdeModulePkg:Fix a robustness issue of Mnp Driver

2016-02-24 Thread Zhang Lubo
v3: * When there exists duplicate items in VLAN variable , save the correct variable content back to the variable storage after duplicate items are removed Duplicate items in VLAN variable will cause MNP driver binding start function fall into infinite loop,so we should check it's content before

[edk2] [PATCH] MdeModulePkg: Add ASSERT to make sure pointer 'MemoryMap' is not NULL.

2016-02-24 Thread Qiu Shumin
If 'CoreGetMemoryMap' return success the 'MemoryMap' shouldn't be NULL. Add code to make sure this. Cc: Yao Jiewen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin --- MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c | 1

[edk2] [Patch 1/4] MdeModulePkg: Change the default IPv4 config policy

2016-02-24 Thread Jiaxin Wu
Git version '3d0a49ad' commit provided a scenario to resolve the performance issue for IPv4, but it's not workable for IPv6. To avoid IPv4 and IPv6 inconsistency, we decided to revert that version fix. If so, the default policy for Ip4Config2 is Ip4Config2PolicyDhcp, which results in all NIC

[edk2] [Patch 4/4] ShellPkg: Revert git 'd6cf1af9' fix

2016-02-24 Thread Jiaxin Wu
'd6cf1af9' is associated with '3d0a49ad' commit. So, this patch is used to respond the revert for '3d0a49ad' to adapt the Ipv4 config policy update. Cc: Subramanian Sriram Cc: El-Haj-Mahmoud Samer Cc: Ye Ting Cc: Fu Siyuan

[edk2] [Patch 2/4] NetworkPkg: Change the default IPv6 config policy

2016-02-24 Thread Jiaxin Wu
The default policy for Ip6Config is Ip6ConfigPolicyAutomatic, which results in all NIC ports starting SARR process when it receives RA message with M flag from IPv6 router. So, this patch is used to changes the the default IPv6 config policy to Ip6ConfigPolicyManualand also defer the SetData

[edk2] [Patch 3/4] NetworkPkg: Revert git 'eb213f2f' fix

2016-02-24 Thread Jiaxin Wu
'eb213f2f' is associated with '3d0a49ad' commit. So, this patch is used to respond the revert for '3d0a49ad' to adapt the Ipv4 config policy update. Cc: Subramanian Sriram Cc: El-Haj-Mahmoud Samer Cc: Ye Ting Cc: Fu Siyuan

Re: [edk2] [PATCH v2] MdeModulePkg:Fix a robustness issue of Mnp Driver

2016-02-24 Thread Zhang, Lubo
Yes , it needs to be modified, thank you for the comment. -Original Message- From: Fu, Siyuan Sent: Thursday, February 25, 2016 11:39 AM To: Zhang, Lubo; edk2-devel@lists.01.org Cc: Ye, Ting; Wu, Jiaxin Subject: RE: [edk2] [PATCH v2] MdeModulePkg:Fix a robustness issue of Mnp Driver Hi,

Re: [edk2] [PATCH v2] MdeModulePkg:Fix a robustness issue of Mnp Driver

2016-02-24 Thread Fu, Siyuan
Hi, Lubo The "continue" should be "break" in below code, otherwise the Count is not correct if there are more than 2 duplicate items in the variable. And please save the correct variable content back to the variable storage after duplicate items are removed. > + if (Buffer[Index].Bits.Vid

[edk2] [PATCH v2] MdeModulePkg:Fix a robustness issue of Mnp Driver

2016-02-24 Thread Zhang Lubo
v2: * If the VLAN has duplicate items, try to delete it instead using VLAN Id 4095 which is a "reserved" tag number. Duplicate items in VLAN variable will cause MNP driver binding start function fall into infinite loop,so we should check it's content before using it. Cc: Fu Siyuan

Re: [edk2] [Patch] MdeModulePkg/PciHostBridge: Refine function header comments.

2016-02-24 Thread Qiu, Shumin
Reviewed-by: Qiu Shumin -Original Message- From: Ni, Ruiyu Sent: Thursday, February 25, 2016 9:14 AM To: edk2-devel@lists.01.org Cc: Ni, Ruiyu; Qiu, Shumin Subject: [Patch] MdeModulePkg/PciHostBridge: Refine function header comments. Contributed-under: TianoCore

Re: [edk2] [PATCH 0/4] free(NULL) and realloc(NULL, size) conformance improvements

2016-02-24 Thread Long, Qin
Great. I will sync-up these changes and follow the windows / VS toolchain validations. Best Regards & Thanks, LONG, Qin > -Original Message- > From: David Woodhouse [mailto:dw...@infradead.org] > Sent: Thursday, February 25, 2016 10:05 AM > To: Laszlo Ersek; edk2-devel-01 > Cc: Dong,

Re: [edk2] [Patch 4/6] NetworkPkg: TlsDxe driver implementation over OpenSSL

2016-02-24 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan > -Original Message- > From: Wu, Jiaxin > Sent: Wednesday, February 24, 2016 4:15 PM > To: edk2-devel@lists.01.org > Cc: Ye, Ting ; Fu, Siyuan ; Long, > Qin > Subject: [Patch 4/6]

Re: [edk2] [Patch] CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2f

2016-02-24 Thread Long, Qin
Laszlo, this is really cool. Thanks for the analysis and root-cause this. Best Regards & Thanks, LONG, Qin > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Thursday, February 25, 2016 3:39 AM > To: David Woodhouse; Long, Qin > Cc: Ye, Ting;

[edk2] [Patch V4 3/3] MdeModuelPkg/PciBus: Return AddrTranslationOffset in GetBarAttributes

2016-02-24 Thread Ruiyu Ni
Some platform doesn't use CPU(HOST)/Device 1:1 mapping for PCI Bus. But PCI IO doesn't have interface to tell caller (device driver) whether the address returned by GetBarAttributes() is HOST address or device address. UEFI Spec 2.6 addresses this issue by clarifying the address returned is HOST

[edk2] [Patch] MdeModulePkg/PciHostBridge: Refine function header comments.

2016-02-24 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Shumin Qiu --- .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 14 ++ .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.h | 26 ++--

Re: [edk2] [Patch V4 3/3] MdeModuelPkg/PciBus: Return AddrTranslationOffset in GetBarAttributes

2016-02-24 Thread Ni, Ruiyu
Laszlo, I just repost the 3rd patch. Please let me know if it doesn't follow the tradition. Regards, Ray >-Original Message- >From: Ni, Ruiyu >Sent: Thursday, February 25, 2016 8:57 AM >To: edk2-devel@lists.01.org >Cc: Ni, Ruiyu ; Benjamin Herrenschmidt

[edk2] [PATCH 0/4] free(NULL) and realloc(NULL, size) conformance improvements

2016-02-24 Thread Laszlo Ersek
The free() wrapper in BaseCryptLib has a bug that has been triggered by David's recent OpenSSL work. The series fixes the bug, plus more instances of the same. Here not only those free() and realloc() functions should be mentioned that this series patches, but also those that are *not* patched.

[edk2] [PATCH 2/4] CryptoPkg: RuntimeCryptLib: support free(NULL)

2016-02-24 Thread Laszlo Ersek
The ISO C standard says about free(), If ptr is a null pointer, no action occurs. This is not true of the RuntimeFreeMem() internal function. Therefore we must not forward the argument of free() to RuntimeFreeMem() without checking. Cc: David Woodhouse Cc: Qin Long

[edk2] [PATCH 3/4] CryptoPkg: RuntimeCryptLib: support realloc(NULL, size)

2016-02-24 Thread Laszlo Ersek
The ISO C standard says about realloc(), If ptr is a null pointer, the realloc function behaves like the malloc function for the specified size. The realloc() implementation doesn't conform to this currently, so add a check and call malloc() if appropriate. Cc: David Woodhouse

[edk2] [PATCH 4/4] MdeModulePkg: RegularExpressionDxe: support free(NULL)

2016-02-24 Thread Laszlo Ersek
The ISO C standard says about free(), If ptr is a null pointer, no action occurs. This is not true of the FreePool() interface of the MemoryAllocationLib class: Buffer must have been allocated on a previous call to the pool allocation services of the Memory Allocation Library. [...] If

Re: [edk2] [Patch] CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2f

2016-02-24 Thread Laszlo Ersek
On 02/24/16 20:30, David Woodhouse wrote: > On Wed, 2016-02-24 at 18:20 +0100, Laszlo Ersek wrote: >> >> Now, in the edk2 build, OPENSSL_free() boils down to a FreePool(). >> However, *unlike* the free() function of the standard C library, >> FreePool() does *not* handle a NULL argument

Re: [edk2] [Patch] CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2f

2016-02-24 Thread Laszlo Ersek
On 02/24/16 18:20, Laszlo Ersek wrote: > On 02/24/16 18:12, Laszlo Ersek wrote: > >>> #4 0x7fdf0917 in CRYPTO_free (str=0x0) >>> at CryptoPkg/Library/OpensslLib/openssl-1.0.2f/crypto/mem.c:442 >>> #5 0x7fe20b47 in PKCS7_verify (p7=0x7ee6ff98, certs=0x0, >>>

Re: [edk2] [Patch] CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2f

2016-02-24 Thread David Woodhouse
On Wed, 2016-02-24 at 18:20 +0100, Laszlo Ersek wrote: > > Now, in the edk2 build, OPENSSL_free() boils down to a FreePool(). > However, *unlike* the free() function of the standard C library, > FreePool() does *not* handle a NULL argument transparently. Well that's just utterly batshit insane,

Re: [edk2] [Patch] CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2f

2016-02-24 Thread Laszlo Ersek
On 02/24/16 17:26, David Woodhouse wrote: > On Wed, 2016-02-24 at 15:46 +0100, Laszlo Ersek wrote: >> Interestingly, the failure reproduces even when I build OVMF at your >> commit a35e4359d; with identical symptoms. > > Also useful to know; thanks. The first commit that breaks it is: commit

Re: [edk2] [Patch] CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2f

2016-02-24 Thread David Woodhouse
On Wed, 2016-02-24 at 15:46 +0100, Laszlo Ersek wrote: > On 02/24/16 13:05, David Woodhouse wrote: > > On Tue, 2016-02-23 at 21:57 +0100, Laszlo Ersek wrote: > > > > First of all, I built it for: > > > - OvmfPkg/OvmfIa32.dsc > > > - OvmfPkg/OvmfIa32X64.dsc > > > - OvmfPkg/OvmfX64.dsc > > > -

Re: [edk2] How to enable SMM in OVMF?

2016-02-24 Thread Laszlo Ersek
On 02/24/16 17:06, Laszlo Ersek wrote: > (2) Build OVMF as you always do, but pass "-D SMM_REQUIRE". > (4) The QEMU command line you want (on Windows, i.e., for software > emulation) is: > > qemu-system-x86_64 \ > -machine pc-q35-2.5,smm=on,accel=tcg \ > -m 2048 \ > -smp 4 \ >

Re: [edk2] How to enable SMM in OVMF?

2016-02-24 Thread Laszlo Ersek
On 02/24/16 07:00, Ni, Ruiyu wrote: > Hi all, > could anyone tell me how to enable SMM in OVMF? > I tried to set the flag SMM_REQUIRE to TRUE but SmmAccessPei > module thinks my HostBridgeDevId cannot support SMM. (Note in advance: the error message is valid; by default QEMU emulates an

Re: [edk2] [Patch] CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2f

2016-02-24 Thread David Woodhouse
On Tue, 2016-02-23 at 21:57 +0100, Laszlo Ersek wrote: > > I'm testing David's patches from his repo referenced above, master branch, > commits > > 1  81009e3cff24 CryptoPkg: Use OpenSSL include directory directly > 2  8a40ff734a1e CryptoPkg/OpensslLib: Include complete copy of >

Re: [edk2] [PATCH v4 0/4] UEFI driver model driver for VirtIO-RNG

2016-02-24 Thread Ard Biesheuvel
On 24 February 2016 at 11:49, Laszlo Ersek wrote: > On 02/24/16 09:34, Ard Biesheuvel wrote: >> This implements a UEFI driver model driver for the VirtIO RNG device. >> >> Changes since v3: >> - add patch to add the driver to OvmfPkg builds (#4) >> - add Jordan's ack to patch

Re: [edk2] [PATCH] ArmPlatformPkg/IntelBds: call BdsLibConnectAll()

2016-02-24 Thread Ard Biesheuvel
On 24 February 2016 at 11:34, Ryan Harkin wrote: > On 24 February 2016 at 10:31, Leif Lindholm wrote: >> Currently, we don't pick up removable media (USB drives) or storage >> devices connected via plug-in cards. Take the sledge hammer approach

Re: [edk2] [PATCH] ArmPlatformPkg/IntelBds: call BdsLibConnectAll()

2016-02-24 Thread Ryan Harkin
On 24 February 2016 at 10:31, Leif Lindholm wrote: > Currently, we don't pick up removable media (USB drives) or storage > devices connected via plug-in cards. Take the sledge hammer approach > for now. > > Contributed-under: TianoCore Contribution Agreement 1.0 >

[edk2] [PATCH] ArmPlatformPkg/IntelBds: call BdsLibConnectAll()

2016-02-24 Thread Leif Lindholm
Currently, we don't pick up removable media (USB drives) or storage devices connected via plug-in cards. Take the sledge hammer approach for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm ---

Re: [edk2] [Patch V4 4/4] MdeModulePkg: Add generic PciHostBridgeDxe driver.

2016-02-24 Thread Laszlo Ersek
On 02/24/16 11:06, Ni, Ruiyu wrote: >> -Original Message- >> From: Laszlo Ersek [mailto:ler...@redhat.com] >> Sent: Wednesday, February 24, 2016 5:40 PM >> To: Ni, Ruiyu ; Marcel Apfelbaum >> Cc: Justen, Jordan L ;

Re: [edk2] [Patch 3/4] MdeModulePkg/Bds: Support short-form URI boot.

2016-02-24 Thread Fu, Siyuan
Hi, Ray You'd better to set the FileBuffer pointer to NULL after free it, otherwise the function will return a freed pointer if the second LoadFile() is falied. Other part is good to me. +if (FileBuffer != NULL) { + FreePool (FileBuffer); +} Reviewed-by: Fu Siyuan

Re: [edk2] [Patch V4 4/4] MdeModulePkg: Add generic PciHostBridgeDxe driver.

2016-02-24 Thread Laszlo Ersek
On 02/24/16 03:46, Ni, Ruiyu wrote: > Laszlo, > > PciBus summarize all the resource requirements for a root bridge, > and submit the resource requirement summary to PciHostBridge driver. > So the allocations occur for each root bridge, but not for each BAR. > > > For the Add[Io/Memory]Space

Re: [edk2] [Patch] MdePkg: Add TLS related protocol definition

2016-02-24 Thread Ye, Ting
Reviewed-by: Ye Ting -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Wu, Jiaxin Sent: Tuesday, February 02, 2016 1:31 PM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan ; Long,

[edk2] [PATCH v4 2/4] OvmfPkg: implement UEFI driver for Virtio RNG devices

2016-02-24 Thread Ard Biesheuvel
This implements a UEFI driver model driver for Virtio devices of type VIRTIO_SUBSYSTEM_ENTROPY_SOURCE, and exposes them via instances of the EFI_RNG_PROTOCOL protocol, supporting the EFI_RNG_ALGORITHM_RAW algorithm only. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard

[edk2] [PATCH v4 1/4] OvmfPkg: VirtioFlush(): return the number of bytes written by the host

2016-02-24 Thread Ard Biesheuvel
From: Laszlo Ersek VirtioLib provides an API for simple, synchronous (request/response-style) virtio communication. The guest driver builds one descriptor chain, link for link, with VirtioPrepare() and VirtioAppendDesc(), then submits the chain, and awaits the processing, with

[edk2] [PATCH v4 3/4] ArmVirtPkg: ArmVirtQemu: add driver for Virtio-RNG device

2016-02-24 Thread Ard Biesheuvel
This adds the new Virtio-RNG DXE module to the default build of ArmVirtQemu. Note that QEMU needs to be invoked with the 'device virtio-rng-pci' option in order for this device to be exposed to the guest. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel

[edk2] [PATCH v4 4/4] OvmfPkg: add driver for Virtio-RNG device

2016-02-24 Thread Ard Biesheuvel
This adds the new Virtio-RNG DXE module to all three builds of OvmfPkg. Note that QEMU needs to be invoked with the 'device virtio-rng-pci' option in order for this device to be exposed to the guest. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel

Re: [edk2] [PATCH v3 4/6] Vlv2TbltDevicePkg: Add FileExplorerLib.inf to the dsc file

2016-02-24 Thread Wei, David
It looks good. Reviewed-by: David Wei > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Dandan Bi > Sent: Wednesday, February 03, 2016 1:01 PM > To: edk2-devel@lists.01.org > Cc: He, Tim ; Dong, Eric

Re: [edk2] [PATCH] ArmPkg: AArch64 exception handling init configures HCR in EL2

2016-02-24 Thread Ard Biesheuvel
On 23 February 2016 at 19:31, Cohen, Eugene wrote: >> > + if (ArmReadCurrentEL() == AARCH64_EL2) { >> > +HcrReg = ArmReadHcr(); >> > + >> > +// set AMO, IMO, and FMO so all available async exceptions go to EL2 >> > +// (EL3 takes precedence over this and may choose to

Re: [edk2] [patch V3] MdeModulePkg: Fix Memory Attributes table type issue

2016-02-24 Thread Yao, Jiewen
Thank you very much! From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] Sent: Wednesday, February 24, 2016 4:15 PM To: Yao, Jiewen Cc: Gao, Liming; edk2-de...@ml01.01.org Subject: Re: [patch V3] MdeModulePkg: Fix Memory Attributes table type issue On 24 February 2016 at 07:02, Yao, Jiewen

[edk2] [Patch 4/6] NetworkPkg: TlsDxe driver implementation over OpenSSL

2016-02-24 Thread Jiaxin Wu
This patch is the implementation of EFI TLS Protocol and EFI TLS Configuration Protocol Interfaces. Cc: Ye Ting Cc: Fu Siyuan Cc: Long Qin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu

[edk2] [Patch 5/6] NetworkPkg: HTTPS support over IPv4 and IPv6

2016-02-24 Thread Jiaxin Wu
This patch is used to enable HTTPS feature. HttpDxe driver will consume TlsDxe driver. It can both support http and https feature, it’s depended on the information in URL, the HTTP instance can be able to determine whether to use http or https. Cc: Ye Ting Cc: Fu Siyuan

[edk2] [Patch 6/6] Nt32Pkg: Enable Nt32Pkg platform HTTPS boot feature.

2016-02-24 Thread Jiaxin Wu
Cc: Ye Ting Cc: Fu Siyuan Cc: Long Qin Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- Nt32Pkg/Nt32Pkg.dsc | 8 +++- Nt32Pkg/Nt32Pkg.fdf

[edk2] [Patch 3/6] CryptoPkg: Add new TlsLib library

2016-02-24 Thread Jiaxin Wu
This patch is used to add new TlsLib library, which is wrapped over OpenSSL. The implementation provides TLS library functions for EFI TLS protocol. Cc: Long Qin Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution

[edk2] [Patch 1/6] MdePkg: Add TLS related protocol definition

2016-02-24 Thread Jiaxin Wu
This patch is used to add Tls.h and TlsConfig.h header files to define EFI TLS Configuration Protocol, EFI TLS Service Binding Protocol and EFI TLS Configuration Protocol. Cc: Ye Ting Cc: Fu Siyuan Cc: Long Qin Contributed-under:

[edk2] [Patch 2/6] CryptoPkg: Add OpensslTlsLib module to enable 'openssl\ssl'

2016-02-24 Thread Jiaxin Wu
This patch is used to add OpensslTlsLib module to enable 'openssl\ssl' function. Cc: Long Qin Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu ---