Re: [edk2-devel] [Patch] BaseTools tools_def.template: Add back -fno-pie option in GCC49 tool chain

2020-02-05 Thread Liming Gao
Mike: GCC IA32 arch requires -fno-pie option. You can check the commit c25d3905523ae4961bb039b1aba597983f7e3e4e "BaseTools/tools_def IA32: disable PIE code generation explicitly". GCC X64 arch requires -fpie option. You can check the commit f49513f666ed25d24bdf3a02a1fdb5d18ae081c0 " BaseToo

Re: [edk2-devel] [Patch v10 2/2] CryptoPkg/BaseHashApiLib: Implement Unified Hash Calculation API

2020-02-05 Thread Laszlo Ersek
Hi, sorry I'm late to this discussion. I'd only like to mention a potential future improvement: On 02/04/20 00:35, Michael D Kinney wrote: > +[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > + ## This PCD indicates the HASH algorithm to calculate hash of data > + # Base

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

2020-02-05 Thread Bob Feng
Hi Pierre, I agree with this change. But for this patch, I found there are two bugs. 1. +# Get Makefile name. +def getMakefileName(self): +if not self._FileType: +return _DEFAULT_FILE_NAME_ Should be self. _DEFAULT_FILE_NAME_ +else: +return s

Re: [edk2-devel] [PATCH v3 1/1] BaseTools: Script for converting .aml to .hex

2020-02-05 Thread Bob Feng
I think INFO or DEBUG would be better. I think some project may care about the warning message and try to resolve it, but actually it's no need to resolve. -Original Message- From: Pierre Gondois Sent: Tuesday, February 4, 2020 11:53 PM To: Pierre Gondois ; devel@edk2.groups.io Cc: ard.

Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative

2020-02-05 Thread Yao, Jiewen
HI Bret Thanks for the work. The design doc is very good. Some feedback/questions below: 1. We have 2 variable related protocol - EDKII_VARIABLE_LOCK_PROTOCOL and EDKII_VAR_CHECK_PROTOCOL. Do you want to deprecate both? Or only deprecate EDKII_VARIABLE_LOCK_PROTOCOL? 2. The Function - Du

Re: [edk2-devel] [PATCH v3 1/1] BaseTools: Build ASL files before C files

2020-02-05 Thread Bob Feng
Hi Pierre, This patch looks good to me. Is there a Bugzilla for this patch? And will you send the patch for INF spec? There may be a typo in the log message: [Sources] FileName1.X FileName2.Y : FileName1.X FileName3.Z : FileName1.X FileName3.Z# here the FileName3.Z should be FileNam

Re: [edk2-devel] [PATCH] MdeModulePkg: Perform test only if not ignore memory test

2020-02-05 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Heng Luo > Sent: Tuesday, January 14, 2020 4:54 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH] MdeModulePkg: Perform test only if not ignore > memory test > > REF: https://bugzilla.tianoco

Re: [edk2-devel] [PATCH v2 00/11] support QEMU's "SMRAM at default SMBASE" feature

2020-02-05 Thread Laszlo Ersek
On 02/05/20 01:22, Ard Biesheuvel wrote: > On Wed, 29 Jan 2020 at 21:44, Laszlo Ersek wrote: >> >> Ref:https://bugzilla.tianocore.org/show_bug.cgi?id=1512 >> Repo: https://github.com/lersek/edk2.git >> Branch: smram_at_default_smbase_bz_1512_wave_1_v2 >> Supersedes: <201909241135

Re: [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements

2020-02-05 Thread Bob Feng
This patch set looks good to me. Reviewed-by: Bob Feng -Original Message- From: Philippe Mathieu-Daude [mailto:phi...@redhat.com] Sent: Wednesday, February 5, 2020 6:49 AM To: devel@edk2.groups.io Cc: Philippe Mathieu-Daude ; Feng, Bob C ; Gao, Liming Subject: [PATCH 0/3] BaseTools/Sc

Re: [edk2-devel] [Patch v10 2/2] CryptoPkg/BaseHashApiLib: Implement Unified Hash Calculation API

2020-02-05 Thread Wang, Jian J
Laszlo, According to RFC discussion, using PCD here is mainly for optimization purpose. So I think we should limit the PCD type to just FixedAtBuild. Then there's no problem for modules linking this library. Regards, Jian > -Original Message- > From: Laszlo Ersek > Sent: Wednesday, Feb

[edk2-devel] [PATCH v4 40/40] UefiCpuPkg/MpInitLib: Prepare SEV-ES guest APs for OS use

2020-02-05 Thread Lendacky, Thomas
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Before UEFI transfers control to the OS, it must park the AP. This is done using the AsmRelocateApLoop function to transition into 32-bit non-paging mode. For an SEV-ES guest, a few additional things must be done: - AsmRelocateApLoop must b

[edk2-devel] [edk2-platform][patch v3] FitGen: Fix the issue to run in X64 linux machine

2020-02-05 Thread Liming Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2466 Memory allocation (malloc) may return the buffer address be above 4G. Current logic always converts the memory address to UINT32. It will cause memory read and free corrupt. This patch uses pointer to store the allocated memory address. Cc: B

Re: [edk2-devel] [PATCH 1/1] SecurityPkg: Fix incorrect return value in documentation

2020-02-05 Thread Wang, Jian J
Hi, I agree with Laszlo. The updated comment still doesn't match the code. I'd suggest to fix the code as well as comment to make sure it confirms to the prototype. Regards, Jian > -Original Message- > From: Laszlo Ersek > Sent: Wednesday, February 05, 2020 7:28 AM > To: devel@edk2.gro

[edk2-devel] [edk2-platform] FitGen: Support FV with the extension header

2020-02-05 Thread Liming Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2086 To find Microcode FILE in FV image, need to skip FV header and FV extension header, then find the first RAW FFS file. Cc: Bob Feng Signed-off-by: Liming Gao --- Silicon/Intel/Tools/FitGen/FitGen.c | 40 +++-

[edk2-devel] [PATCH v4 1/1] BaseTools: Script for converting .aml to .hex

2020-02-05 Thread PierreGondois
From: Pierre Gondois The "-tc" option of the iasl compiler allows to generate a .hex file containing a C array storing AML bytecode. An online discussion suggested that this "-tc" option was specific to the iasl compiler and it shouldn't be relied on. This conversation is available at: https://e

Re: [edk2-devel] setting the push label at once, when opening a PR [was: SecurityPkg/DxeImageVerificationHandler: fix retval for "deny" policy]

2020-02-05 Thread Michael D Kinney
Hi Laszlo, If I follow this link, I see the expected screen with the ability to set a label: https://github.com/lersek/edk2/pull/new/smram_at_default_smbase_bz_1512_wave_1_v2_pull If I type in the following URL from your screen shot, I also get the same screen with the ability to set a label:

Re: [edk2-devel] [Patch v10 2/2] CryptoPkg/BaseHashApiLib: Implement Unified Hash Calculation API

2020-02-05 Thread Michael D Kinney
Jian, I agree. If the PCD type is anything but FixedAtBuild, the compiler can not optimize away the unused BaseCryptLib functions. I think the best solution is to limit this PCD to only FixedAtBuild. Thank you for noticing this issue Laszlo! Mike > -Original Message- > From: Wang, Jia

Re: [edk2-devel] setting the push label at once, when opening a PR [was: SecurityPkg/DxeImageVerificationHandler: fix retval for "deny" policy]

2020-02-05 Thread Laszlo Ersek
On 02/05/20 17:16, Kinney, Michael D wrote: > Hi Laszlo, > > If I follow this link, I see the expected screen with the ability to set a > label: > > https://github.com/lersek/edk2/pull/new/smram_at_default_smbase_bz_1512_wave_1_v2_pull > > If I type in the following URL from your screen shot, I

Re: [edk2-devel] [Patch v10 2/2] CryptoPkg/BaseHashApiLib: Implement Unified Hash Calculation API

2020-02-05 Thread Laszlo Ersek
On 02/05/20 17:18, Kinney, Michael D wrote: > Jian, > > I agree. If the PCD type is anything but FixedAtBuild, > the compiler can not optimize away the unused BaseCryptLib > functions. > > I think the best solution is to limit this PCD to only > FixedAtBuild. I agree that that technically solve

Re: [edk2-devel] [PATCH 0/1] Use _MSC_VER to determine MSVC compiler

2020-02-05 Thread Vitaly Cheptsov via Groups.Io
4 февр. 2020 г., в 09:56, Gao, Liming написал(а):Vitaly:  Yes. I think we should have better solution in OpenSSL to support EDK2 usage. But, this is a long term solution. For now, I will try the solution to remove -fms-compatibility option in CLANGPDB tool chain

Re: [edk2-devel] [PATCH v1] UefiCpuPkg/MpInitLib: Always get CPUID & PlatformID in MicrocodeDetect()

2020-02-05 Thread Wu, Hao A
Thanks Siyuan and Eric, The patch has been pushed via commit a9e3458ba7. Best Regards, Hao Wu > -Original Message- > From: Dong, Eric > Sent: Tuesday, February 04, 2020 9:47 PM > To: devel@edk2.groups.io; Wu, Hao A > Cc: Ni, Ray; Laszlo Ersek; Fu, Siyuan; Kinney, Michael D > Subject: RE

[edk2-devel] [PATCH v1] MdeModulePkg/PiDxeS3BootScriptLib: Fix potential numeric truncation (CVE-2019-14563)

2020-02-05 Thread Wu, Hao A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2001 For S3BootScriptLib APIs: S3BootScriptSaveIoWrite S3BootScriptSaveMemWrite S3BootScriptSavePciCfgWrite S3BootScriptSavePciCfg2Write S3BootScriptSaveSmbusExecute S3BootScriptSaveInformation S3BootScriptSaveInformationAsciiString S3BootScriptL

Re: [EXTERNAL] Re: [edk2-devel] [RFC] VariablePolicy - Protocol, Libraries, and Implementation for VariableLock Alternative

2020-02-05 Thread Bret Barkelew via Groups.Io
Kevin, Agreed and we were sensitive to that in our codebase as well. Surface and other consumers had drivers expecting VarLock and we didn’t want to have to rewrite them all (at least not immediately). If you take a look at the MuVarPolicyFoundationDxe driver in the extras branch… It contains a

[edk2-devel] [PATCH v1 2/2] UefiCpuPkg/MpInitLib: Not pass microcode info between archs in CPU_MP_DATA

2020-02-05 Thread Wu, Hao A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2465 Commit 89164babec: UefiCpuPkg/MpInitLib: don't shadow the microcode patch twice. attempted to use 'MicrocodePatchRegionSize' and 'MicrocodePatchAddress' fields to avoid loading the microcode patches data into memory again in the DXE phase.

[edk2-devel] [PATCH v1 0/2] Fix backward incompatible CPU_MP_DATA struct change

2020-02-05 Thread Wu, Hao A
The series will resolve a backward compatibility issue with pre-built binaries (e.g. FSP) introduced by commit 88bd0661661. The relocation of 'MicrocodePatchRegionSize' and 'MicrocodePatchAddress' fields in structure CPU_MP_DATA may cause access issue for platforms that use pre-built FSP binary, s

[edk2-devel] [PATCH v1 1/2] Revert UefiCpuPkg/MpInitLib: Relocate microcode patch fields in CPU_MP_DATA

2020-02-05 Thread Wu, Hao A
This reverts commit 88bd06616617ef2569f093f7b51893c11ad78e26. REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2465 Commit 88bd0661661 relocates the 'MicrocodePatchAddress' and 'MicrocodePatchRegionSize' fields in structure CPU_MP_DATA to ensure that they can be properly passed between differen

[edk2-devel] [PATCH v1] Maintainers.txt: Change NetworkPkg maintainer role.

2020-02-05 Thread Wu, Jiaxin
Change Jiaxin Wu from Maintainer to Reviewer. Cc: Maciej Rabeda Cc: Siyuan Fu Signed-off-by: Jiaxin Wu --- Maintainers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintainers.txt b/Maintainers.txt index ca9da28925..00b46a4884 100644 --- a/Maintainers.txt +++ b/Maint

Re: [edk2-devel] [PATCH v1 0/2] Fix backward incompatible CPU_MP_DATA struct change

2020-02-05 Thread Wu, Hao A
> -Original Message- > From: Wu, Hao A > Sent: Thursday, February 06, 2020 1:24 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A; Kubacki, Michael A; Kinney, Michael D; Dong, Eric; Ni, Ray; > Laszlo Ersek > Subject: [PATCH v1 0/2] Fix backward incompatible CPU_MP_DATA struct > change > > The