* unable to build update capsule image
@ 2017-01-04 7:13 Iddamsetty, Aravind (Artesyn)
2017-01-04 8:00 ` Yao, Jiewen
2017-01-04 8:14 ` Yao, Jiewen
0 siblings, 2 replies; 13+ messages in thread
From: Iddamsetty, Aravind (Artesyn) @ 2017-01-04 7:13 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Hi All,
I am trying to build a Quark Bios update capsule image in my EDK2 enviroment. But it is failing with below errors. Kindly request you to help me out with this.
Build Command : build -a IA32 -t VS2010x86 -p QuarkPlatformPkg\Quark.dsc -D CAPSULE_ENABLE
-------------------------------------------------------------------------------
Generating CAPSULEDISPATCHFV FV
###
Generating SYSTEMFIRMWAREUPDATECARGO FV
###
Generate QUARKFIRMWAREUPDATECAPSULEFMPPKCS7 Capsule
#Return Value = 1
OpenSSL 0.9.8g 19 Oct 2007
#
## ['Pkcs7Sign', '-e', '--monotonic-count', '2', '-o', 'c:\\sspro\\build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\QUARKFIRMWAREUPDATECAPSULEFMPPKCS7.tmp', 'c:\\sspro\\
build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\SYSTEMFIRMWAREUPDATECARGO.Fv']
GenFds...
: error 7000: Failed to generate FMP auth capsule
build...
: error 7000: Failed to execute command
GenFds -f c:\sspro\build\edk2\QuarkPlatformPkg\Quark.fdf --conf=c:\sspro\build\edk2\conf -o c:\sspro\build\Build\Quark\DEBUG_VS2010x86 -t VS2010x86 -b DEB
UG -p c:\sspro\build\edk2\QuarkPlatformPkg\Quark.dsc -a IA32 -D "EFI_SOURCE=c:\\sspro\\build\\edk2\\edkcompatibilitypkg" -D "EDK_SOURCE=c:\\sspro\\build\\edk2\\
edkcompatibilitypkg" -D "TOOL_CHAIN_TAG=VS2010x86" -D "TOOLCHAIN=VS2010x86" -D "TARGET=DEBUG" -D "FAMILY=MSFT" -D "CAPSULE_ENABLE=TRUE" -D "SECURE_BOOT_ENAB
LE=TRUE" -D "WORKSPACE=c:\\sspro\\build" -D "EDK_TOOLS_PATH=c:\\sspro\\build\\edk2\\basetools" -D "ARCH=IA32" -D "ECP_SOURCE=c:\\sspro\\build\\edk2\\edkcompat
ibilitypkg" [c:\sspro\build]
- Failed -
Build end time: 16:24:46, Jan.02 2017
Build total time: 00:04:43
-------------------------------------------------------------------------------------------------------------------------------
Thanks & Regards,
Aravind.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: unable to build update capsule image
2017-01-04 7:13 unable to build update capsule image Iddamsetty, Aravind (Artesyn)
@ 2017-01-04 8:00 ` Yao, Jiewen
2017-01-04 8:14 ` Yao, Jiewen
1 sibling, 0 replies; 13+ messages in thread
From: Yao, Jiewen @ 2017-01-04 8:00 UTC (permalink / raw)
To: Iddamsetty, Aravind (Artesyn), edk2-devel@lists.01.org
Hi
Enabling capsule requires signing. So you need generate the openssl.exe.
Thank you
Yao Jiewen
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Iddamsetty, Aravind (Artesyn)
> Sent: Wednesday, January 4, 2017 3:14 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] unable to build update capsule image
>
> Hi All,
>
>
> I am trying to build a Quark Bios update capsule image in my EDK2 enviroment.
> But it is failing with below errors. Kindly request you to help me out with this.
>
>
>
> Build Command : build -a IA32 -t VS2010x86 -p QuarkPlatformPkg\Quark.dsc -D
> CAPSULE_ENABLE
>
> -------------------------------------------------------------------------------
>
> Generating CAPSULEDISPATCHFV FV
>
> ###
>
> Generating SYSTEMFIRMWAREUPDATECARGO FV
>
> ###
>
> Generate QUARKFIRMWAREUPDATECAPSULEFMPPKCS7 Capsule
>
> #Return Value = 1
>
> OpenSSL 0.9.8g 19 Oct 2007
>
>
>
>
>
>
>
> #
>
> ## ['Pkcs7Sign', '-e', '--monotonic-count', '2', '-o',
> 'c:\\sspro\\build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\QUARKFIRMWAREUP
> DATECAPSULEFMPPKCS7.tmp', 'c:\\sspro\\
>
> build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\SYSTEMFIRMWAREUPDATECARG
> O.Fv']
>
> GenFds...
>
> : error 7000: Failed to generate FMP auth capsule
>
>
>
> build...
>
> : error 7000: Failed to execute command
>
> GenFds -f c:\sspro\build\edk2\QuarkPlatformPkg\Quark.fdf
> --conf=c:\sspro\build\edk2\conf -o
> c:\sspro\build\Build\Quark\DEBUG_VS2010x86 -t VS2010x86 -b DEB
>
> UG -p c:\sspro\build\edk2\QuarkPlatformPkg\Quark.dsc -a IA32 -D
> "EFI_SOURCE=c:\\sspro\\build\\edk2\\edkcompatibilitypkg" -D
> "EDK_SOURCE=c:\\sspro\\build\\edk2\\
>
> edkcompatibilitypkg" -D "TOOL_CHAIN_TAG=VS2010x86" -D
> "TOOLCHAIN=VS2010x86" -D "TARGET=DEBUG" -D "FAMILY=MSFT" -D
> "CAPSULE_ENABLE=TRUE" -D "SECURE_BOOT_ENAB
>
> LE=TRUE" -D "WORKSPACE=c:\\sspro\\build" -D
> "EDK_TOOLS_PATH=c:\\sspro\\build\\edk2\\basetools" -D "ARCH=IA32" -D
> "ECP_SOURCE=c:\\sspro\\build\\edk2\\edkcompat
>
> ibilitypkg" [c:\sspro\build]
>
>
>
> - Failed -
>
> Build end time: 16:24:46, Jan.02 2017
>
> Build total time: 00:04:43
>
> ---------------------------------------------------------------------------------------------------
> ----------------------------
>
>
>
> Thanks & Regards,
>
> Aravind.
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: unable to build update capsule image
2017-01-04 7:13 unable to build update capsule image Iddamsetty, Aravind (Artesyn)
2017-01-04 8:00 ` Yao, Jiewen
@ 2017-01-04 8:14 ` Yao, Jiewen
2017-01-04 8:51 ` Iddamsetty, Aravind (Artesyn)
2017-01-12 3:02 ` how to update capsule image with CapsuleApp wang xiaofeng
1 sibling, 2 replies; 13+ messages in thread
From: Yao, Jiewen @ 2017-01-04 8:14 UTC (permalink / raw)
To: Iddamsetty, Aravind (Artesyn), edk2-devel@lists.01.org
I found we mentioned below in \Vlv2TbltDevicePkg\Build_IFWI.bat
If capsule update is needed, please update CAPSULE_ENABLE = TRUE in Config.dsc.
If recovery is needed, please update RECOVERY_ENABLE = TRUE in Config.dsc.
If either of above is TRUE, please set OPENSSL_PATH in windows evironment
and put openssl.exe there, to generate final capsule image.
It is for your reference.
Thank you
Yao Jiewen
From: Yao, Jiewen
Sent: Wednesday, January 4, 2017 4:00 PM
To: 'Iddamsetty, Aravind (Artesyn)' <Aravind.Iddamsetty@Artesyn.com>; edk2-devel@lists.01.org
Subject: RE: unable to build update capsule image
Hi
Enabling capsule requires signing. So you need generate the openssl.exe.
Thank you
Yao Jiewen
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Iddamsetty, Aravind (Artesyn)
> Sent: Wednesday, January 4, 2017 3:14 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] unable to build update capsule image
>
> Hi All,
>
>
> I am trying to build a Quark Bios update capsule image in my EDK2 enviroment.
> But it is failing with below errors. Kindly request you to help me out with this.
>
>
>
> Build Command : build -a IA32 -t VS2010x86 -p QuarkPlatformPkg\Quark.dsc -D
> CAPSULE_ENABLE
>
> -------------------------------------------------------------------------------
>
> Generating CAPSULEDISPATCHFV FV
>
> ###
>
> Generating SYSTEMFIRMWAREUPDATECARGO FV
>
> ###
>
> Generate QUARKFIRMWAREUPDATECAPSULEFMPPKCS7 Capsule
>
> #Return Value = 1
>
> OpenSSL 0.9.8g 19 Oct 2007
>
>
>
>
>
>
>
> #
>
> ## ['Pkcs7Sign', '-e', '--monotonic-count', '2', '-o',
> 'c:\\sspro\\build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\QUARKFIRMWAREUP
> DATECAPSULEFMPPKCS7.tmp', 'c:\\sspro\\
>
> build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\SYSTEMFIRMWAREUPDATECARG
> O.Fv']
>
> GenFds...
>
> : error 7000: Failed to generate FMP auth capsule
>
>
>
> build...
>
> : error 7000: Failed to execute command
>
> GenFds -f c:\sspro\build\edk2\QuarkPlatformPkg\Quark.fdf
> --conf=c:\sspro\build\edk2\conf -o
> c:\sspro\build\Build\Quark\DEBUG_VS2010x86 -t VS2010x86 -b DEB
>
> UG -p c:\sspro\build\edk2\QuarkPlatformPkg\Quark.dsc -a IA32 -D
> "EFI_SOURCE=c:\\sspro\\build\\edk2\\edkcompatibilitypkg" -D
> "EDK_SOURCE=c:\\sspro\\build\\edk2\\
>
> edkcompatibilitypkg" -D "TOOL_CHAIN_TAG=VS2010x86" -D
> "TOOLCHAIN=VS2010x86" -D "TARGET=DEBUG" -D "FAMILY=MSFT" -D
> "CAPSULE_ENABLE=TRUE" -D "SECURE_BOOT_ENAB
>
> LE=TRUE" -D "WORKSPACE=c:\\sspro\\build" -D
> "EDK_TOOLS_PATH=c:\\sspro\\build\\edk2\\basetools" -D "ARCH=IA32" -D
> "ECP_SOURCE=c:\\sspro\\build\\edk2\\edkcompat
>
> ibilitypkg" [c:\sspro\build]
>
>
>
> - Failed -
>
> Build end time: 16:24:46, Jan.02 2017
>
> Build total time: 00:04:43
>
> ---------------------------------------------------------------------------------------------------
> ----------------------------
>
>
>
> Thanks & Regards,
>
> Aravind.
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: unable to build update capsule image
2017-01-04 8:14 ` Yao, Jiewen
@ 2017-01-04 8:51 ` Iddamsetty, Aravind (Artesyn)
2017-01-12 3:02 ` how to update capsule image with CapsuleApp wang xiaofeng
1 sibling, 0 replies; 13+ messages in thread
From: Iddamsetty, Aravind (Artesyn) @ 2017-01-04 8:51 UTC (permalink / raw)
To: Yao, Jiewen; +Cc: edk2-devel@lists.01.org
Hi Yao Jiewen,
Thank you so much, after I set the OPENSSL_PATH I was able to generate capsule image.
Thanks & Regards,
Aravind.
From: Yao, Jiewen [mailto:jiewen.yao@intel.com]
Sent: Wednesday, January 04, 2017 1:44 PM
To: Iddamsetty, Aravind [ENGINEERING/IN]; edk2-devel@lists.01.org
Subject: RE: unable to build update capsule image
I found we mentioned below in \Vlv2TbltDevicePkg\Build_IFWI.bat
If capsule update is needed, please update CAPSULE_ENABLE = TRUE in Config.dsc.
If recovery is needed, please update RECOVERY_ENABLE = TRUE in Config.dsc.
If either of above is TRUE, please set OPENSSL_PATH in windows evironment
and put openssl.exe there, to generate final capsule image.
It is for your reference.
Thank you
Yao Jiewen
From: Yao, Jiewen
Sent: Wednesday, January 4, 2017 4:00 PM
To: 'Iddamsetty, Aravind (Artesyn)' <Aravind.Iddamsetty@Artesyn.com<mailto:Aravind.Iddamsetty@Artesyn.com>>; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Subject: RE: unable to build update capsule image
Hi
Enabling capsule requires signing. So you need generate the openssl.exe.
Thank you
Yao Jiewen
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Iddamsetty, Aravind (Artesyn)
> Sent: Wednesday, January 4, 2017 3:14 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] unable to build update capsule image
>
> Hi All,
>
>
> I am trying to build a Quark Bios update capsule image in my EDK2 enviroment.
> But it is failing with below errors. Kindly request you to help me out with this.
>
>
>
> Build Command : build -a IA32 -t VS2010x86 -p QuarkPlatformPkg\Quark.dsc -D
> CAPSULE_ENABLE
>
> -------------------------------------------------------------------------------
>
> Generating CAPSULEDISPATCHFV FV
>
> ###
>
> Generating SYSTEMFIRMWAREUPDATECARGO FV
>
> ###
>
> Generate QUARKFIRMWAREUPDATECAPSULEFMPPKCS7 Capsule
>
> #Return Value = 1
>
> OpenSSL 0.9.8g 19 Oct 2007
>
>
>
>
>
>
>
> #
>
> ## ['Pkcs7Sign', '-e', '--monotonic-count', '2', '-o',
> 'c:\\sspro\\build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\QUARKFIRMWAREUP
> DATECAPSULEFMPPKCS7.tmp', 'c:\\sspro\\
>
> build\\Build\\Quark\\DEBUG_VS2010x86\\FV\\SYSTEMFIRMWAREUPDATECARG
> O.Fv']
>
> GenFds...
>
> : error 7000: Failed to generate FMP auth capsule
>
>
>
> build...
>
> : error 7000: Failed to execute command
>
> GenFds -f c:\sspro\build\edk2\QuarkPlatformPkg\Quark.fdf
> --conf=c:\sspro\build\edk2\conf -o
> c:\sspro\build\Build\Quark\DEBUG_VS2010x86 -t VS2010x86 -b DEB
>
> UG -p c:\sspro\build\edk2\QuarkPlatformPkg\Quark.dsc -a IA32 -D
> "EFI_SOURCE=c:\\sspro\\build\\edk2\\edkcompatibilitypkg" -D
> "EDK_SOURCE=c:\\sspro\\build\\edk2\\
>
> edkcompatibilitypkg" -D "TOOL_CHAIN_TAG=VS2010x86" -D
> "TOOLCHAIN=VS2010x86" -D "TARGET=DEBUG" -D "FAMILY=MSFT" -D
> "CAPSULE_ENABLE=TRUE" -D "SECURE_BOOT_ENAB
>
> LE=TRUE" -D "WORKSPACE=c:\\sspro\\build" -D
> "EDK_TOOLS_PATH=c:\\sspro\\build\\edk2\\basetools" -D "ARCH=IA32" -D
> "ECP_SOURCE=c:\\sspro\\build\\edk2\\edkcompat
>
> ibilitypkg" [c:\sspro\build]
>
>
>
> - Failed -
>
> Build end time: 16:24:46, Jan.02 2017
>
> Build total time: 00:04:43
>
> ---------------------------------------------------------------------------------------------------
> ----------------------------
>
>
>
> Thanks & Regards,
>
> Aravind.
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* how to update capsule image with CapsuleApp
2017-01-04 8:14 ` Yao, Jiewen
2017-01-04 8:51 ` Iddamsetty, Aravind (Artesyn)
@ 2017-01-12 3:02 ` wang xiaofeng
2017-01-12 3:26 ` Yao, Jiewen
1 sibling, 1 reply; 13+ messages in thread
From: wang xiaofeng @ 2017-01-12 3:02 UTC (permalink / raw)
To: Yao, Jiewen, edk2-devel@lists.01.org
HI All,
I want to update capsule image with CapsuleApp. The capsule image is built and can be update by CapsuleApp. From current edk2 master code ,it seems the reset mode should be S3 mode first (I understand this since we need to keep capsule information in memory),but CapsuleApp will only trigger a EfiResetWarm type reset. so how can this app used to update bios capsule?
Or I can only test this feature in Windows 10?
Thanks in advance!\x16�&
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to update capsule image with CapsuleApp
2017-01-12 3:02 ` how to update capsule image with CapsuleApp wang xiaofeng
@ 2017-01-12 3:26 ` Yao, Jiewen
2017-01-13 5:33 ` seems a minor logic error in UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe wang xiaofeng
0 siblings, 1 reply; 13+ messages in thread
From: Yao, Jiewen @ 2017-01-12 3:26 UTC (permalink / raw)
To: wang xiaofeng, edk2-devel@lists.01.org
That's good question.
The "reset system service implementation" is expected to detect capsule variable and convert the reset type from warm reset to a type which can maintain the system memory.
It could be warm reset, if the warm reset can keep the memory content.
Or it could be S3 reset, if the warm reset cannot keep the memory content.
Thank you
Yao Jiewen
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of wang
> xiaofeng
> Sent: Thursday, January 12, 2017 11:02 AM
> To: Yao, Jiewen <jiewen.yao@intel.com>; edk2-devel@lists.01.org
> Subject: [edk2] how to update capsule image with CapsuleApp
>
> HI All,
> I want to update capsule image with CapsuleApp. The capsule image is built
> and can be update by CapsuleApp. From current edk2 master code ,it seems the
> reset mode should be S3 mode first (I understand this since we need to keep
> capsule information in memory),but CapsuleApp will only trigger a
> EfiResetWarm type reset. so how can this app used to update bios capsule?
> Or I can only test this feature in Windows 10?
> Thanks in advance!
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* seems a minor logic error in UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe
2017-01-12 3:26 ` Yao, Jiewen
@ 2017-01-13 5:33 ` wang xiaofeng
2017-01-24 7:56 ` SetUnicodeMem in DisplayEngineDxe seems unsafe wang xiaofeng
0 siblings, 1 reply; 13+ messages in thread
From: wang xiaofeng @ 2017-01-13 5:33 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Hi All.
In UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe,TempVarName is initlized but not used. I guess the author tends to set
TempVarName instead of CapsuleVarName if user calls UpdateCapsule multiple times. The two name are same for the first call .
StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
if (mTimes > 0) {
UnicodeValueToString (TempVarName, 0, mTimes, 0);
}
//
// ScatterGatherList is only referenced if the capsules are defined to persist across
// system reset. Set its value into NV storage to let pre-boot driver to pick it up
// after coming through a system reset.
//
Status = EfiSetVariable (
CapsuleVarName,
&gEfiCapsuleVendorGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,
sizeof (UINTN),
(VOID *) &ScatterGatherList
);
\x16�&
^ permalink raw reply [flat|nested] 13+ messages in thread
* SetUnicodeMem in DisplayEngineDxe seems unsafe
2017-01-13 5:33 ` seems a minor logic error in UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe wang xiaofeng
@ 2017-01-24 7:56 ` wang xiaofeng
2017-01-25 0:54 ` Gao, Liming
0 siblings, 1 reply; 13+ messages in thread
From: wang xiaofeng @ 2017-01-24 7:56 UTC (permalink / raw)
To: edk2-devel@lists.01.org, Dong, Eric
Hi DisplayEngineDxe Owner,
SetUnicodeMem seems unsafe since the buffer may overflow if the input Size is bigger than buffer size.Do we think about improve the function
/**
Set Buffer to Value for Size bytes.
@param Buffer Memory to set.
@param Size Number of bytes to set
@param Value Value of the set operation.
**/
VOID
SetUnicodeMem (
IN VOID *Buffer,
IN UINTN Size,
IN CHAR16 Value
)
{
CHAR16 *Ptr;
Ptr = Buffer;
while ((Size--) != 0) {
*(Ptr++) = Value;
}
}
The problem I meet is liking the following screen. Year in main page shows incorrect char randomly.
If I turn off GetNumericInput optimize with #pragma optimize( "", off ) in InputHandler.c , or swtich to use StrCpyS like this. The problem disappear. This issue cannot be seen in OVMF ,but it can be reproduced in our own platform with a rate of 30%.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: SetUnicodeMem in DisplayEngineDxe seems unsafe
2017-01-24 7:56 ` SetUnicodeMem in DisplayEngineDxe seems unsafe wang xiaofeng
@ 2017-01-25 0:54 ` Gao, Liming
2017-01-25 2:21 ` wang xiaofeng
0 siblings, 1 reply; 13+ messages in thread
From: Gao, Liming @ 2017-01-25 0:54 UTC (permalink / raw)
To: wang xiaofeng, edk2-devel@lists.01.org, Dong, Eric
Xiaofeng:
Yes. This is a potential issue. This API should be updated with original Buffer Size. Could you help submit this issue in BugZillar?
Thanks
Liming
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>wang xiaofeng
>Sent: Tuesday, January 24, 2017 3:56 PM
>To: edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>
>Subject: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
>
>Hi DisplayEngineDxe Owner,
> SetUnicodeMem seems unsafe since the buffer may overflow if the input
>Size is bigger than buffer size.Do we think about improve the function
>
>
>/**
> Set Buffer to Value for Size bytes.
>
>
> @param Buffer Memory to set.
> @param Size Number of bytes to set
> @param Value Value of the set operation.
>
>
>**/
>VOID
>SetUnicodeMem (
> IN VOID *Buffer,
> IN UINTN Size,
> IN CHAR16 Value
> )
>{
> CHAR16 *Ptr;
>
>
> Ptr = Buffer;
> while ((Size--) != 0) {
> *(Ptr++) = Value;
> }
>}
>
> The problem I meet is liking the following screen. Year in main page shows
>incorrect char randomly.
>
> If I turn off GetNumericInput optimize with #pragma optimize( "", off ) in
>InputHandler.c , or swtich to use StrCpyS like this. The problem disappear. This
>issue cannot be seen in OVMF ,but it can be reproduced in our own platform
>with a rate of 30%.
>
>
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: SetUnicodeMem in DisplayEngineDxe seems unsafe
2017-01-25 0:54 ` Gao, Liming
@ 2017-01-25 2:21 ` wang xiaofeng
2017-01-25 2:29 ` Gao, Liming
2017-01-25 2:29 ` Dong, Eric
0 siblings, 2 replies; 13+ messages in thread
From: wang xiaofeng @ 2017-01-25 2:21 UTC (permalink / raw)
To: Gao, Liming; +Cc: edk2-devel@lists.01.org, Dong, Eric
Hi Liming,
Where is the BugZillar link? I will try if I can submit it. But not sure where I can quickly apply for an account.
At 2017-01-25 08:54:47, "Gao, Liming" <liming.gao@intel.com> wrote:
>Xiaofeng:
> Yes. This is a potential issue. This API should be updated with original Buffer Size. Could you help submit this issue in BugZillar?
>
>Thanks
>Liming
>>-----Original Message-----
>>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>>wang xiaofeng
>>Sent: Tuesday, January 24, 2017 3:56 PM
>>To: edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>
>>Subject: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
>>
>>Hi DisplayEngineDxe Owner,
>> SetUnicodeMem seems unsafe since the buffer may overflow if the input
>>Size is bigger than buffer size.Do we think about improve the function
>>
>>
>>/**
>> Set Buffer to Value for Size bytes.
>>
>>
>> @param Buffer Memory to set.
>> @param Size Number of bytes to set
>> @param Value Value of the set operation.
>>
>>
>>**/
>>VOID
>>SetUnicodeMem (
>> IN VOID *Buffer,
>> IN UINTN Size,
>> IN CHAR16 Value
>> )
>>{
>> CHAR16 *Ptr;
>>
>>
>> Ptr = Buffer;
>> while ((Size--) != 0) {
>> *(Ptr++) = Value;
>> }
>>}
>>
>> The problem I meet is liking the following screen. Year in main page shows
>>incorrect char randomly.
>>
>> If I turn off GetNumericInput optimize with #pragma optimize( "", off ) in
>>InputHandler.c , or swtich to use StrCpyS like this. The problem disappear. This
>>issue cannot be seen in OVMF ,but it can be reproduced in our own platform
>>with a rate of 30%.
>>
>>
>>
>>_______________________________________________
>>edk2-devel mailing list
>>edk2-devel@lists.01.org
>>https://lists.01.org/mailman/listinfo/edk2-devel
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
\x16�&
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: SetUnicodeMem in DisplayEngineDxe seems unsafe
2017-01-25 2:21 ` wang xiaofeng
@ 2017-01-25 2:29 ` Gao, Liming
2017-01-25 2:29 ` Dong, Eric
1 sibling, 0 replies; 13+ messages in thread
From: Gao, Liming @ 2017-01-25 2:29 UTC (permalink / raw)
To: wang xiaofeng; +Cc: edk2-devel@lists.01.org, Dong, Eric
https://bugzilla.tianocore.org/
Thanks
Liming
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>wang xiaofeng
>Sent: Wednesday, January 25, 2017 10:22 AM
>To: Gao, Liming <liming.gao@intel.com>
>Cc: edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>
>Subject: Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
>
>Hi Liming,
> Where is the BugZillar link? I will try if I can submit it. But not sure where I
>can quickly apply for an account.
>
>
>
>
>
>
>
>
>At 2017-01-25 08:54:47, "Gao, Liming" <liming.gao@intel.com> wrote:
>>Xiaofeng:
>> Yes. This is a potential issue. This API should be updated with original Buffer
>Size. Could you help submit this issue in BugZillar?
>>
>>Thanks
>>Liming
>>>-----Original Message-----
>>>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>>>wang xiaofeng
>>>Sent: Tuesday, January 24, 2017 3:56 PM
>>>To: edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>
>>>Subject: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
>>>
>>>Hi DisplayEngineDxe Owner,
>>> SetUnicodeMem seems unsafe since the buffer may overflow if the
>input
>>>Size is bigger than buffer size.Do we think about improve the function
>>>
>>>
>>>/**
>>> Set Buffer to Value for Size bytes.
>>>
>>>
>>> @param Buffer Memory to set.
>>> @param Size Number of bytes to set
>>> @param Value Value of the set operation.
>>>
>>>
>>>**/
>>>VOID
>>>SetUnicodeMem (
>>> IN VOID *Buffer,
>>> IN UINTN Size,
>>> IN CHAR16 Value
>>> )
>>>{
>>> CHAR16 *Ptr;
>>>
>>>
>>> Ptr = Buffer;
>>> while ((Size--) != 0) {
>>> *(Ptr++) = Value;
>>> }
>>>}
>>>
>>> The problem I meet is liking the following screen. Year in main page shows
>>>incorrect char randomly.
>>>
>>> If I turn off GetNumericInput optimize with #pragma optimize( "", off ) in
>>>InputHandler.c , or swtich to use StrCpyS like this. The problem disappear.
>This
>>>issue cannot be seen in OVMF ,but it can be reproduced in our own
>platform
>>>with a rate of 30%.
>>>
>>>
>>>
>>>_______________________________________________
>>>edk2-devel mailing list
>>>edk2-devel@lists.01.org
>>>https://lists.01.org/mailman/listinfo/edk2-devel
>>_______________________________________________
>>edk2-devel mailing list
>>edk2-devel@lists.01.org
>>https://lists.01.org/mailman/listinfo/edk2-devel
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: SetUnicodeMem in DisplayEngineDxe seems unsafe
2017-01-25 2:21 ` wang xiaofeng
2017-01-25 2:29 ` Gao, Liming
@ 2017-01-25 2:29 ` Dong, Eric
2017-01-25 2:48 ` wang xiaofeng
1 sibling, 1 reply; 13+ messages in thread
From: Dong, Eric @ 2017-01-25 2:29 UTC (permalink / raw)
To: wang xiaofeng, Gao, Liming; +Cc: edk2-devel@lists.01.org
Xiaofeng,
BugZillar link is: https://bugzilla.tianocore.org/
Thanks,
Eric
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of wang xiaofeng
> Sent: Wednesday, January 25, 2017 10:22 AM
> To: Gao, Liming
> Cc: edk2-devel@lists.01.org; Dong, Eric
> Subject: Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
>
> Hi Liming,
> Where is the BugZillar link? I will try if I can submit it. But not sure where I can quickly apply for an account.
>
>
>
>
>
>
>
>
> At 2017-01-25 08:54:47, "Gao, Liming" <liming.gao@intel.com> wrote:
> >Xiaofeng:
> > Yes. This is a potential issue. This API should be updated with original Buffer Size. Could you help submit this issue in BugZillar?
> >
> >Thanks
> >Liming
> >>-----Original Message-----
> >>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> >>wang xiaofeng
> >>Sent: Tuesday, January 24, 2017 3:56 PM
> >>To: edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>
> >>Subject: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
> >>
> >>Hi DisplayEngineDxe Owner,
> >> SetUnicodeMem seems unsafe since the buffer may overflow if the input
> >>Size is bigger than buffer size.Do we think about improve the function
> >>
> >>
> >>/**
> >> Set Buffer to Value for Size bytes.
> >>
> >>
> >> @param Buffer Memory to set.
> >> @param Size Number of bytes to set
> >> @param Value Value of the set operation.
> >>
> >>
> >>**/
> >>VOID
> >>SetUnicodeMem (
> >> IN VOID *Buffer,
> >> IN UINTN Size,
> >> IN CHAR16 Value
> >> )
> >>{
> >> CHAR16 *Ptr;
> >>
> >>
> >> Ptr = Buffer;
> >> while ((Size--) != 0) {
> >> *(Ptr++) = Value;
> >> }
> >>}
> >>
> >> The problem I meet is liking the following screen. Year in main page shows
> >>incorrect char randomly.
> >>
> >> If I turn off GetNumericInput optimize with #pragma optimize( "", off ) in
> >>InputHandler.c , or swtich to use StrCpyS like this. The problem disappear. This
> >>issue cannot be seen in OVMF ,but it can be reproduced in our own platform
> >>with a rate of 30%.
> >>
> >>
> >>
> >>_______________________________________________
> >>edk2-devel mailing list
> >>edk2-devel@lists.01.org
> >>https://lists.01.org/mailman/listinfo/edk2-devel
> >_______________________________________________
> >edk2-devel mailing list
> >edk2-devel@lists.01.org
> >https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: SetUnicodeMem in DisplayEngineDxe seems unsafe
2017-01-25 2:29 ` Dong, Eric
@ 2017-01-25 2:48 ` wang xiaofeng
0 siblings, 0 replies; 13+ messages in thread
From: wang xiaofeng @ 2017-01-25 2:48 UTC (permalink / raw)
To: Dong, Eric; +Cc: Gao, Liming, edk2-devel@lists.01.org
Hi Eric and Liming,
Bug 358 is submitted for this issue.
At 2017-01-25 10:29:52, "Dong, Eric" <eric.dong@intel.com> wrote:
>Xiaofeng,
>
>BugZillar link is: https://bugzilla.tianocore.org/
>
>Thanks,
>Eric
>> -----Original Message-----
>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of wang xiaofeng
>> Sent: Wednesday, January 25, 2017 10:22 AM
>> To: Gao, Liming
>> Cc: edk2-devel@lists.01.org; Dong, Eric
>> Subject: Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
>>
>> Hi Liming,
>> Where is the BugZillar link? I will try if I can submit it. But not sure where I can quickly apply for an account.
>>
>>
>>
>>
>>
>>
>>
>>
>> At 2017-01-25 08:54:47, "Gao, Liming" <liming.gao@intel.com> wrote:
>> >Xiaofeng:
>> > Yes. This is a potential issue. This API should be updated with original Buffer Size. Could you help submit this issue in BugZillar?
>> >
>> >Thanks
>> >Liming
>> >>-----Original Message-----
>> >>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>> >>wang xiaofeng
>> >>Sent: Tuesday, January 24, 2017 3:56 PM
>> >>To: edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>
>> >>Subject: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
>> >>
>> >>Hi DisplayEngineDxe Owner,
>> >> SetUnicodeMem seems unsafe since the buffer may overflow if the input
>> >>Size is bigger than buffer size.Do we think about improve the function
>> >>
>> >>
>> >>/**
>> >> Set Buffer to Value for Size bytes.
>> >>
>> >>
>> >> @param Buffer Memory to set.
>> >> @param Size Number of bytes to set
>> >> @param Value Value of the set operation.
>> >>
>> >>
>> >>**/
>> >>VOID
>> >>SetUnicodeMem (
>> >> IN VOID *Buffer,
>> >> IN UINTN Size,
>> >> IN CHAR16 Value
>> >> )
>> >>{
>> >> CHAR16 *Ptr;
>> >>
>> >>
>> >> Ptr = Buffer;
>> >> while ((Size--) != 0) {
>> >> *(Ptr++) = Value;
>> >> }
>> >>}
>> >>
>> >> The problem I meet is liking the following screen. Year in main page shows
>> >>incorrect char randomly.
>> >>
>> >> If I turn off GetNumericInput optimize with #pragma optimize( "", off ) in
>> >>InputHandler.c , or swtich to use StrCpyS like this. The problem disappear. This
>> >>issue cannot be seen in OVMF ,but it can be reproduced in our own platform
>> >>with a rate of 30%.
>> >>
>> >>
>> >>
>> >>_______________________________________________
>> >>edk2-devel mailing list
>> >>edk2-devel@lists.01.org
>> >>https://lists.01.org/mailman/listinfo/edk2-devel
>> >_______________________________________________
>> >edk2-devel mailing list
>> >edk2-devel@lists.01.org
>> >https://lists.01.org/mailman/listinfo/edk2-devel
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
\x16�&
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-01-25 2:49 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-04 7:13 unable to build update capsule image Iddamsetty, Aravind (Artesyn)
2017-01-04 8:00 ` Yao, Jiewen
2017-01-04 8:14 ` Yao, Jiewen
2017-01-04 8:51 ` Iddamsetty, Aravind (Artesyn)
2017-01-12 3:02 ` how to update capsule image with CapsuleApp wang xiaofeng
2017-01-12 3:26 ` Yao, Jiewen
2017-01-13 5:33 ` seems a minor logic error in UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe wang xiaofeng
2017-01-24 7:56 ` SetUnicodeMem in DisplayEngineDxe seems unsafe wang xiaofeng
2017-01-25 0:54 ` Gao, Liming
2017-01-25 2:21 ` wang xiaofeng
2017-01-25 2:29 ` Gao, Liming
2017-01-25 2:29 ` Dong, Eric
2017-01-25 2:48 ` wang xiaofeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox