Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/UefiBootManagerLib: log reserved mem allocation failure

2020-01-13 Thread Wu, Hao A
> -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Laszlo Ersek > Sent: Thursday, January 09, 2020 7:43 AM > To: edk2-devel-groups-io > Cc: Wu, Hao A; Wang, Jian J; Ni, Ray; Gao, Zhichao > Subject: [edk2-devel] [PATCH 1/2]

Re: [edk2-devel] [PATCH V1 1/1] MdeModulePkg/Variable: Fix VarErrorFlag RT cache offset calculation

2020-01-13 Thread Wang, Jian J
Michael, I'm not sure sync-ing whole variable cache memory is an efficient operation. What about using mVariableModuleGlobal->NonVolatileLastVariableOffset as Length parameter? Status = SynchronizeRuntimeVariableCache (

[edk2-devel] [PATCH v2] CryptoPkg/BaseCryptLib: remove HmacXxxGetContextSize interface

2020-01-13 Thread Wang, Jian J
> v2 changes: > - change HmacXxxInit to HmacXxxSetKey > - remove calling to HMAC_CTX_reset() since HmacXxxNew() has done it > already and user-supplied context is not supported any longer. > - update comments affected by above change REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1792

Re: [edk2-devel] [PATCH] CryptoPkg/BaseCryptLib: deprecate HmacXxxGetContextSize interface

2020-01-13 Thread Wang, Jian J
Laszlo, Good suggestions. I'll send v2 patch soon. Regards, Jian > -Original Message- > From: devel@edk2.groups.io On Behalf Of Laszlo Ersek > Sent: Thursday, January 09, 2020 10:20 PM > To: Wang, Jian J ; devel@edk2.groups.io > Cc: Lu, XiaoyuX > Subject: Re: [edk2-devel] [PATCH]

Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/SdMmcPciHcDxe: Refactor command error detection

2020-01-13 Thread Wu, Hao A
> -Original Message- > From: Albecki, Mateusz > Sent: Monday, January 13, 2020 9:49 PM > To: Wu, Hao A; devel@edk2.groups.io > Cc: Marcin Wojtas; Gao, Zhichao; Gao, Liming > Subject: RE: [PATCH 1/3] MdeModulePkg/SdMmcPciHcDxe: Refactor > command error detection > > Hi, > > I will fix the

Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths

2020-01-13 Thread Ni, Ray
Vitaly, I still have concern to modify the EDKII code to workaround a firmware bug. Can you just change in your local version? Thanks, Ray From: devel@edk2.groups.io On Behalf Of Vitaly Cheptsov via Groups.Io Sent: Tuesday, January 14, 2020 4:47 AM To: Laszlo Ersek ; devel@edk2.groups.io; Ni,

[edk2-devel] [PATCH V1 1/1] MdeModulePkg/Variable: Fix VarErrorFlag RT cache offset calculation

2020-01-13 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2457 This commit fixes an offset calculation that is used to write the VarErrorFlag UEFI variable to the UEFI variable runtime cache. Currently a physical address is used instead of an offset. This commit changes the offset to zero with a length

Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/UefiBootManagerLib: log reserved mem allocation failure

2020-01-13 Thread Laszlo Ersek
On 01/13/20 02:53, Siyuan, Fu wrote: > The change looks good to me. > > Reviewed-by: Siyuan Fu Thank you, Siyuan! Hao, Jian, can one of you please give a formal Acked-by, based on Siyuan's and Phil's "Reviewed-by"s? (I'm asking because I'm not sure if you would be comfortable with me pushing

Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths

2020-01-13 Thread Vitaly Cheptsov via Groups.Io
Thanks all for your input, These explanations seem sufficient to us that it is not a good idea to change the behaviour for everyone. Even so, we still need this to be configurable in some way, as having to patch EDK II is impracticable. We believe there are three possible routes to approach

[edk2-devel] [PATCH v1 1/1] SecurityPkg: BaseHashLib: Implement Unified Hash API-for-

2020-01-13 Thread Sukerkar, Amol N
From: "Sukerkar, Amol N" This commit introduces a Unified Hash API to calculate hash using a hashing algorithm specified by the PCD, PcdSystemHashPolicy. This library interfaces with the various hashing API, such as, MD4, MD5, SHA1, SHA256, SHA512 and SM3_256 implemented in CryptoPkg. The user

[edk2-devel] [PATCH v1 0/1] *** Unified Hash Calucation API ***

2020-01-13 Thread Sukerkar, Amol N
From: "Sukerkar, Amol N" Currently the UEFI drivers using the SHA/SM3 hashing algorithms use hard-coded API to calculate the hash, such as, sha_256(…), etc. Since SHA384 and/or SM3 are being increasingly adopted, it becomes cumbersome to modify the driver with SHA384 or SM3 calls for each

Re: [edk2-devel] [Patch] BaseTools/Scripts/PatchCheck: Address false error conditions

2020-01-13 Thread Michael D Kinney
Hi Laszlo, This patch has been pushed. https://github.com/tianocore/edk2/pull/297 I also entered a new BZ to relax CVE pattern check. https://bugzilla.tianocore.org/show_bug.cgi?id=2462 Mike > -Original Message- > From: devel@edk2.groups.io On > Behalf Of Laszlo Ersek >

Re: [edk2-devel] [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow consoles on drivers loaded via Driver####

2020-01-13 Thread Andrew Fish via Groups.Io
Ard, Is the problem GFX console? Would it be possible to have a PCD to assume graphics console, and if non was found on the boot connect those PCI devices and update the NVRAM to cause a console to connect. You might have to do a 2nd connect on the GOP handle after the nvram variable was

Re: [edk2-devel] [PATCH] MdePkg: PE loader should zero out dest buffer on allocation

2020-01-13 Thread Laszlo Ersek
On 01/13/20 09:18, Zhiguang Liu wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1999 > > When PE loader loads image to memory, the first section of image may > not locate right next to the image header, which causes some memory > space remaining uninitialized. This is a security

Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths

2020-01-13 Thread Laszlo Ersek
On 01/13/20 12:56, Ni, Ray wrote: > We shouldn't assume that a DriverBindingStart() can only start on a handle > with device path installed. DevicePath protocol is just a special protocol. > It's possible that a bus driver starts on a host controller handle and > creates multiple children, each

Re: [edk2-devel] [Patch] BaseTools/Scripts/PatchCheck: Address false error conditions

2020-01-13 Thread Laszlo Ersek
Hello Mike, thanks a lot for this patch! Comments below: On 01/10/20 23:53, Michael D Kinney wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=2406 > > * Always print subject line after the git commit id to make > it easier to know the context of warnings or errors. > * Allow UTF-8

Re: [edk2-devel] [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow consoles on drivers loaded via Driver####

2020-01-13 Thread Ard Biesheuvel
On Fri, 10 Jan 2020 at 17:23, Laszlo Ersek wrote: > > On 01/10/20 15:37, Ni, Ray wrote: > > Ard, > > I understand now that: BeforeConsole() needs to connect Gfx to get the GOP > > device path > > for ConOut updating. But the GOP driver is specified in Driver and it > > will be loaded after

Re: [edk2-devel] [PATCH 4/4] ArmVirtPkg/ArmVirtQemu: add optional support for TPM2 measured boot

2020-01-13 Thread Laszlo Ersek
On 01/13/20 02:55, Gary Lin wrote: > On Fri, Jan 10, 2020 at 12:32:02AM +, Yao, Jiewen wrote: >> Hi Marc-André >> Would you please share some information on how to use vTPM with QEMU? >> >> I saw https://github.com/stefanberger/qemu-tpm >> >> But I am not sure if that has been integrated to

[edk2-devel] [PATCH v1 1/1] BaseTools: Rationalise makefile generation

2020-01-13 Thread PierreGondois
From: Pierre Gondois The GenMake.py script tests the platform environment to determine the type of makefile that needs to be generated. If a Windows build host is detected, the makefile generated is of Nmake type. Otherwise a GNUmake type is generated. Furthermore, the ___MAKE_PATH option in

Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/SdMmcPciHcDxe: Refactor command error detection

2020-01-13 Thread Albecki, Mateusz
Hi, I will fix the 2 issues in separate patch probably before doing the refactor to avoid reverting it if the refactor introduces some unexpected issues. Please also see inline. Thanks, Mateusz > -Original Message- > From: Wu, Hao A > Sent: Friday, January 10, 2020 6:38 AM > To:

Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths

2020-01-13 Thread Ni, Ray
We shouldn't assume that a DriverBindingStart() can only start on a handle with device path installed. DevicePath protocol is just a special protocol. It's possible that a bus driver starts on a host controller handle and creates multiple children, each with only a Specific_IO protocol

Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths

2020-01-13 Thread Vitaly Cheptsov via Groups.Io
Hi, ‘Freeze’ means it is hung up forever, and we believe it is caused by an invalid memory access in the firmware code. Using loading command with ‘-nc’ (no connect) will work fine, but that is kind of expected, as the issue is caused exactly by the connect logic. We do not believe it is

Re: [edk2-devel] [PATCH] MdePkg: PE loader should zero out dest buffer on allocation

2020-01-13 Thread Marvin Häuser
Good day, Please see my comment in the related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1999#c5 Best regards, Marvin Am 13.01.2020 um 09:18 schrieb Zhiguang Liu: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1999 When PE loader loads image to memory, the first section of

[edk2-devel] [PATCH] MdePkg: PE loader should zero out dest buffer on allocation

2020-01-13 Thread Zhiguang Liu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1999 When PE loader loads image to memory, the first section of image may not locate right next to the image header, which causes some memory space remaining uninitialized. This is a security issue. This patch compares the ending address of

Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths

2020-01-13 Thread Gao, Zhichao
Hi, What does 'freeze' mean? System blocked for a while or it hung up forever? The change would affect the operation of the 'load' command. If some drivers need to connect to the device controller but it doesn't have a device path protocol, the behavior of 'load' may be incorrect. Is the