[edk2] [PATCH v2] MdeModulePkg/BDS: Fix a buffer overflow bug

2017-05-19 Thread Ruiyu Ni
KeyOption points to a buffer holding the content of Key. So its size is smaller than EFI_BOOT_MANAGER_KEY_OPTION. Old code to assign value to KeyOption->OptionNumber modifies the memory outside of the KeyOption buffer. The patch fixes this bug. Contributed-under: TianoCore Contribution Agreem

[edk2] [PATCH] CryptoPkg/BaseCryptLib: Add NULL pointer checks in DH and P7Verify

2017-05-19 Thread Long Qin
Add more NULL pointer checks before using them in DhGenerateKey and Pkcs7GetCertificatesList functions to eliminate possible dereferenced pointer issue. Cc: Ting Ye Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long --- CryptoPkg/Library/BaseCryptLib/Pk/

Re: [edk2] [PATCH v2] MdeModulePkg/BDS: Fix a buffer overflow bug

2017-05-19 Thread Fan, Jeff
Reviewed-by: Jeff Fan -Original Message- From: Ni, Ruiyu Sent: Friday, May 19, 2017 3:26 PM To: edk2-devel@lists.01.org Cc: Shi, Steven; Zeng, Star; Fan, Jeff Subject: [PATCH v2] MdeModulePkg/BDS: Fix a buffer overflow bug KeyOption points to a buffer holding the content of Key. So

Re: [edk2] [PATCH v2] MdeModulePkg/BDS: Fix a buffer overflow bug

2017-05-19 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Fan, Jeff Sent: Friday, May 19, 2017 3:31 PM To: Ni, Ruiyu ; edk2-devel@lists.01.org Cc: Shi, Steven ; Zeng, Star Subject: RE: [PATCH v2] MdeModulePkg/BDS: Fix a buffer overflow bug Reviewed-by: Jeff Fan -Original Message- From:

Re: [edk2] [PATCH] CryptoPkg/BaseCryptLib: Add NULL pointer checks in DH and P7Verify

2017-05-19 Thread Wu, Hao A
Reviewed-by: Hao Wu Best Regards, Hao Wu > -Original Message- > From: Long, Qin > Sent: Friday, May 19, 2017 3:27 PM > To: Ye, Ting; Wu, Hao A; edk2-devel@lists.01.org > Cc: Long, Qin > Subject: [PATCH] CryptoPkg/BaseCryptLib: Add NULL pointer checks in DH and > P7Verify > > Add more

Re: [edk2] [PATCH] MdePkg: Fix undefined behavior on variadic parameters

2017-05-19 Thread Laszlo Ersek
On 05/19/17 03:35, Gao, Liming wrote: > Laszlo: > Based on your analysis, the parameter type should be changed from BOOLEAN > to INT32 to match its promotion type. Right? Not necessarily. BOOLEAN (unsigned char) is indeed promoted to INT32 (int), so BOOLEAN is not appropriate. But any integer

Re: [edk2] [PATCH] MdePkg: Fix undefined behavior on variadic parameters

2017-05-19 Thread Laszlo Ersek
On 05/19/17 04:45, Sergei Temerkhanov wrote: > On Thu, May 18, 2017 at 1:19 PM, Laszlo Ersek wrote: >> On 05/16/17 14:10, Sergei Temerkhanov wrote: >>> On Tue, May 16, 2017 at 8:10 AM, Gao, Liming wrote: Sergey: Could you give more detail on the undefined behavior on variadic pa

Re: [edk2] [Patch] OvmfPkg: Add XCODE5 statements to fix build break

2017-05-19 Thread Laszlo Ersek
On 05/19/17 08:30, Michael Kinney wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=559 > > The XCODE5 tool chain has a FAMILY of GCC. The > GCC statements in the [BuildOptions] section add > flags that are not compatible with XCODE5. Add > empty XCODE5 statements in [BuildOptions] section

Re: [edk2] [Patch] OvmfPkg: Add XCODE5 statements to fix build break

2017-05-19 Thread Ard Biesheuvel
On 19 May 2017 at 07:30, Michael Kinney wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=559 > > The XCODE5 tool chain has a FAMILY of GCC. The > GCC statements in the [BuildOptions] section add > flags that are not compatible with XCODE5. Add > empty XCODE5 statements in [BuildOptions] s

Re: [edk2] [PATCH] CryptoPkg/BaseCryptLib: Add NULL pointer checks in DH and P7Verify

2017-05-19 Thread Ye, Ting
Reviewed-by: Ye Ting -Original Message- From: Long, Qin Sent: Friday, May 19, 2017 3:27 PM To: Ye, Ting ; Wu, Hao A ; edk2-devel@lists.01.org Cc: Long, Qin Subject: [PATCH] CryptoPkg/BaseCryptLib: Add NULL pointer checks in DH and P7Verify Add more NULL pointer checks before using t

Re: [edk2] [PATCH 1/8] ArmPlatformPkg/NorFlashDxe: correct NumOfLba vararg type in EraseBlocks()

2017-05-19 Thread Leif Lindholm
On Thu, May 18, 2017 at 01:44:58PM -0700, Jordan Justen wrote: > On 2017-05-18 12:29:09, Laszlo Ersek wrote: > > On 05/18/17 19:21, Jordan Justen wrote: > > > On 2017-05-18 08:04:20, Laszlo Ersek wrote: > > >> // All blocks must be within range > > >> -DEBUG ((DEBUG_BLKIO, "FvbEraseBlocks:

Re: [edk2] [PATCH] Arm: GICv3: Don't access GIC_ICDIPR for interrupts 0..31

2017-05-19 Thread Leif Lindholm
On Fri, May 19, 2017 at 05:37:02AM +0300, Sergei Temerkhanov wrote: > On Thu, May 18, 2017 at 7:08 PM, Ard Biesheuvel > wrote: > > On 16 May 2017 at 03:56, Sergey Temerkhanov wrote: > >> These registers are reserved for PPIs and unimplemented on > >> some architectures > >> > > > > > > What do yo

Re: [edk2] SMBios configuration table not present until late stage of boot

2017-05-19 Thread Tomas Pilar (tpilar)
The problem to solve is uniquely and persistently identifying which NICs are grouped together in which host to a third party management system over LAN during preboot in a reasonably secure way. If we use a random generated UUID every reboot, we're not persistent. If we store the UUID across r

[edk2] [PATCH] BaseTools/Scripts: discard .gnu.hash section in GCC builds

2017-05-19 Thread Ard Biesheuvel
Some builds of GCC/binutils will default to using the GNU flavor of the symbol hash table, and will emit it into a section called .gnu.hash rather than .hash. We have no use for its contents, and GenFw ignores it anyway, so it shouldn't really matter what we do with it. However, due to a workaroun

Re: [edk2] [PATCH] BaseTools/Scripts: discard .gnu.hash section in GCC builds

2017-05-19 Thread Leif Lindholm
On Fri, May 19, 2017 at 11:47:40AM +0100, Ard Biesheuvel wrote: > Some builds of GCC/binutils will default to using the GNU flavor of > the symbol hash table, and will emit it into a section called .gnu.hash > rather than .hash. We have no use for its contents, and GenFw ignores > it anyway, so it

Re: [edk2] [Patch] UefiCpuPkg: Use FINIT instead of hex values

2017-05-19 Thread Fan, Jeff
Reviewed-by: Jeff Fan -Original Message- From: Kinney, Michael D Sent: Friday, May 19, 2017 2:37 PM To: edk2-devel@lists.01.org Cc: Fan, Jeff; Gao, Liming; Kinney, Michael D Subject: [Patch] UefiCpuPkg: Use FINIT instead of hex values https://bugzilla.tianocore.org/show_bug.cgi?id=560

Re: [edk2] [Patch 1/2] BaseTools: Add -D NO_MSABI_VARGS to X64 XCODE5 CC_FLAGS

2017-05-19 Thread Ard Biesheuvel
On 19 May 2017 at 07:52, Michael Kinney wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=561 > > Update BaseTools/Conf/tools_def.template to add the define > > -D NO_MSABI_VAARGS > > To CC_FLAGS for X64 XCODE5 builds. > > The llvm/clang compiler used in XCODE5 builds supports the > _ms_ ver

Re: [edk2] [RFC PATCH] ArmPkg: implement generic SMMU driver to remap DRAM for 32-bit PCI DMA

2017-05-19 Thread Ard Biesheuvel
On 2 May 2017 at 11:32, Ard Biesheuvel wrote: > This implements a driver that uses any SMMU compatible with the generic > ARM SMMU architecture to remap the lowest 4 GB of DRAM in a way that > makes it accessible to PCI masters that are only 32-bit DMA capable. > > Note that this driver goes a bit

Re: [edk2] [PATCH] Arm: GICv3: Don't access GIC_ICDIPR for interrupts 0..31

2017-05-19 Thread Sergei Temerkhanov
On Fri, May 19, 2017 at 1:26 PM, Leif Lindholm wrote: > On Fri, May 19, 2017 at 05:37:02AM +0300, Sergei Temerkhanov wrote: >> On Thu, May 18, 2017 at 7:08 PM, Ard Biesheuvel >> wrote: >> > On 16 May 2017 at 03:56, Sergey Temerkhanov >> > wrote: >> >> These registers are reserved for PPIs and u

[edk2] [Patch V2] MdeModulePkg/LogoDxe: Return error if HII Package not present

2017-05-19 Thread Michael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=554 Update LogoDxe module to print a DEBUG() messahe and exit with an error instead of ASSERT_EFI_ERROR() if the HII Image Package with the logo image is not present. If a tool chain does not support generation of PE/COFF resource sections, then this

Re: [edk2] [Patch] OvmfPkg: Add XCODE5 statements to fix build break

2017-05-19 Thread Kinney, Michael D
Hi Ard, The order of assignment does not matter. I have tried it both ways and both orders use the XCODE option instead of the GCC option when the XCODE5 tool chain is used. I have tried to adjust the XCODE family build flags to do 4KB alignment of PE/COFF sections for RT and SMM modules. This

Re: [edk2] [Patch 1/2] BaseTools: Add -D NO_MSABI_VARGS to X64 XCODE5 CC_FLAGS

2017-05-19 Thread Andrew Fish
> On May 19, 2017, at 5:49 AM, Ard Biesheuvel wrote: > > On 19 May 2017 at 07:52, Michael Kinney > wrote: >> https://bugzilla.tianocore.org/show_bug.cgi?id=561 >> >> Update BaseTools/Conf/tools_def.template to add the define >> >> -D NO_MSABI_VAARGS >> >> T

Re: [edk2] [Patch 1/2] BaseTools: Add -D NO_MSABI_VARGS to X64 XCODE5 CC_FLAGS

2017-05-19 Thread Ard Biesheuvel
On 19 May 2017 at 17:46, Andrew Fish wrote: > > On May 19, 2017, at 5:49 AM, Ard Biesheuvel > wrote: > > On 19 May 2017 at 07:52, Michael Kinney wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=561 > > Update BaseTools/Conf/tools_def.template to add the define > > -D NO_MSABI_VAARGS > >

Re: [edk2] [PATCH 1/8] ArmPlatformPkg/NorFlashDxe: correct NumOfLba vararg type in EraseBlocks()

2017-05-19 Thread Jordan Justen
On 2017-05-19 03:07:56, Leif Lindholm wrote: > On Thu, May 18, 2017 at 01:44:58PM -0700, Jordan Justen wrote: > > On 2017-05-18 12:29:09, Laszlo Ersek wrote: > > > On 05/18/17 19:21, Jordan Justen wrote: > > > > On 2017-05-18 08:04:20, Laszlo Ersek wrote: > > > >> // All blocks must be within

Re: [edk2] [Patch] OvmfPkg: Add XCODE5 statements to fix build break

2017-05-19 Thread Ard Biesheuvel
On 19 May 2017 at 17:45, Kinney, Michael D wrote: > Hi Ard, > > The order of assignment does not matter. I have tried it > both ways and both orders use the XCODE option instead of the > GCC option when the XCODE5 tool chain is used. > Interesting. Is this fully specified in any of the EDK2 spec

Re: [edk2] [Patch] OvmfPkg: Add XCODE5 statements to fix build break

2017-05-19 Thread Andrew Fish
> On May 19, 2017, at 10:02 AM, Ard Biesheuvel > wrote: > > On 19 May 2017 at 17:45, Kinney, Michael D wrote: >> Hi Ard, >> >> The order of assignment does not matter. I have tried it >> both ways and both orders use the XCODE option instead of the >> GCC option when the XCODE5 tool chain is

Re: [edk2] [Patch] OvmfPkg: Add XCODE5 statements to fix build break

2017-05-19 Thread Kinney, Michael D
Ard, The spec question is a good one. The statements from tools_def.txt that apply here are: *_XCODE5_*_*_FAMILY= GCC *_XCODE5_*_*_BUILDRULEFAMILY = XCODE A build option statement may start with a FAMILY name or a BUILDRULEFAMILY name. If both are present, then statement tha

Re: [edk2] SMBios configuration table not present until late stage of boot

2017-05-19 Thread Andrew Fish
> On May 19, 2017, at 3:32 AM, Tomas Pilar (tpilar) > wrote: > > The problem to solve is uniquely and persistently identifying which NICs are > grouped together in which host to a third party management system over LAN > during preboot in a reasonably secure way. > > If we use a random gener

[edk2] Hello,I have Microsoft RM-1156

2017-05-19 Thread JieHao Deng
Halo,but I can go to setting and I can't Go to the windows menu,could you tell me how can I fresh images ? 发自我的 iPhone ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

[edk2] Hello,I have Microsoft RM-1156

2017-05-19 Thread JieHao Deng
Halo,but I can go to setting and I can't Go to the windows menu,could you tell me how can I fresh images ? 发自我的 iPhone ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] SMBios configuration table not present until late stage of boot

2017-05-19 Thread Laszlo Ersek
On 05/19/17 12:32, Tomas Pilar (tpilar) wrote: > The problem to solve is uniquely and persistently identifying which NICs > are grouped together in which host to a third party management system > over LAN during preboot in a reasonably secure way. > > If we use a random generated UUID every reboot

Re: [edk2] [Patch 0/2] BaseTools: Fix XCODE5 build breaks for varargs

2017-05-19 Thread Andrew Fish
Reviewed-by: Andrew Fish > On May 18, 2017, at 11:52 PM, Michael Kinney > wrote: > > * Add -D NO_MSABI_VAARGS to X64 XCODE CC_FLAGS > * Clean up XCODE5 tool chain statements > > Cc: Andrew Fish > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Micha

Re: [edk2] [Patch] edk2: Add .DS_Store to .gitignore for macOS

2017-05-19 Thread Andrew Fish
Reviewed-by: Andrew Fish mailto:af...@apple.com>> > On May 18, 2017, at 11:22 PM, Michael Kinney > wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=558 > > macOS may generate .DS_Store files in directories. > The .gitignore file is updated to ignore these > .DS_Store files. > > Cc: A