Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-10 Thread Ni, Ruiyu
; > Cc: Zeng, Star <star.z...@intel.com>; Ard Biesheuvel > <ard.biesheu...@linaro.org>; Ni, Ruiyu <ruiyu...@intel.com>; Dong, Eric > <eric.d...@intel.com>; edk2-devel@lists.01.org; leif.lindh...@linaro.org > Subject: Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLi

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-05 Thread Yao, Jiewen
> Laszlo > >> -Original Message- >> From: Laszlo Ersek [mailto:ler...@redhat.com] >> Sent: Wednesday, October 4, 2017 11:06 PM >> To: Zeng, Star <star.z...@intel.com>; Ard Biesheuvel >> <ard.biesheu...@linaro.org> >> Cc: Ni, Ruiyu <ru

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-05 Thread Laszlo Ersek
PM > To: Zeng, Star <star.z...@intel.com>; Ard Biesheuvel > <ard.biesheu...@linaro.org> > Cc: Ni, Ruiyu <ruiyu...@intel.com>; Dong, Eric <eric.d...@intel.com>; > edk2-devel@lists.01.org; leif.lindh...@linaro.org; Yao, Jiewen > <jiewen@intel.com

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-05 Thread Zeng, Star
sday, October 4, 2017 11:06 PM To: Zeng, Star <star.z...@intel.com>; Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: Ni, Ruiyu <ruiyu...@intel.com>; Dong, Eric <eric.d...@intel.com>; edk2-devel@lists.01.org; leif.lindh...@linaro.org; Yao, Jiewen <jiewen....@intel.com>

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-04 Thread Laszlo Ersek
heu...@linaro.org] > Sent: Wednesday, October 4, 2017 9:54 PM > To: Zeng, Star <star.z...@intel.com> > Cc: Yao, Jiewen <jiewen@intel.com>; Ni, Ruiyu <ruiyu...@intel.com>; > edk2-devel@lists.01.org; Dong, Eric <eric.d...@intel.com>; > leif.lindh...@lin

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-04 Thread Ard Biesheuvel
On 4 October 2017 at 15:40, Laszlo Ersek wrote: > On 10/04/17 15:54, Ard Biesheuvel wrote: >> On 4 October 2017 at 14:49, Zeng, Star wrote: >>> Creating Boot000@ with gEfiGlobalVariableGuid can not succeed as it will be >>> rejected by

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-04 Thread Laszlo Ersek
On 10/04/17 15:54, Ard Biesheuvel wrote: > On 4 October 2017 at 14:49, Zeng, Star wrote: >> Creating Boot000@ with gEfiGlobalVariableGuid can not succeed as it will be >> rejected by MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf that >> will check the VariableName

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-04 Thread Zeng, Star
g, Eric <eric.d...@intel.com>; leif.lindh...@linaro.org Subject: Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname On 4 October 2017 at 14:49, Zeng, Star <star.z...@intel.com> wrote: > Creating Boot000@ with gEfiGlobalVariableGui

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-04 Thread Ard Biesheuvel
On 4 October 2017 at 14:49, Zeng, Star wrote: > Creating Boot000@ with gEfiGlobalVariableGuid can not succeed as it will be > rejected by MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf that > will check the VariableName against UEFI spec “Table 13. Global Variables”

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-04 Thread Zeng, Star
evel@lists.01.org; Dong, Eric <eric.d...@intel.com>; leif.lindh...@linaro.org Subject: RE: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname I agree. If creating Boot000@ can hit this ASSERT, this ASSERT must be removed. Error handling must be used to h

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-03 Thread Yao, Jiewen
<star.z...@intel.com> Cc: Ni, Ruiyu <ruiyu...@intel.com>; edk2-devel@lists.01.org; Dong, Eric <eric.d...@intel.com>; leif.lindh...@linaro.org Subject: Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname On 4 October 2017 at 00:56, Zeng, Star &l

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-03 Thread Ard Biesheuvel
On 4 October 2017 at 00:56, Zeng, Star wrote: > Hi Ard, > > To me, the ASSERT there seems on purpose to help catch the misuse of that > interface. > Could you share the case you met the ASSERT? > When using the 'fwupdate' Linux tool to perform capsule updates, BootNext is

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-03 Thread Zeng, Star
Hi Ard, To me, the ASSERT there seems on purpose to help catch the misuse of that interface. Could you share the case you met the ASSERT? Given that interface is an open API of UefiBootManagerLib, some comments for the behavior of ASSERT may can be added to be more clear. Cc Ruiyu who is the

[edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname

2017-10-03 Thread Ard Biesheuvel
When invoking EfiBootManagerIsValidLoadOptionVariableName() with the variable name 'BootNext', we should simply return FALSE, given that it is not an indexed Boot load option. However, in DEBUG mode, we will hit an assert in BmCharToUint() and crash. So remove the assert. Contributed-under: