Jun: I agree this change. You can add my reviewed-by. Thanks Liming > -----邮件原件----- > 发件人: xueshengfeng <[email protected]> > 发送时间: 2022年7月4日 18:00 > 收件人: [email protected] > 抄送: [email protected]; [email protected]; > [email protected]; [email protected]; Lijun10x > <[email protected]> > 主题: [PATCH] MdeModulePkg/Variable: SCT run AuthVar_conf is failed > > From: Lijun10x <[email protected]> > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3969 > > Attr are > EFI_VARIABLE_NON_VOLATILE|VARIABLE_AUTHENTICATED_WRITE_ACCESS > , > will return EFI_INVALID_PARAMETER. > Added one case, only when one attribute is EFI_VARIABLE_NON_VOLATILE > will EFI_INVALID_PARAMETER be returned. > If attr are > EFI_VARIABLE_NON_VOLATILE|VARIABLE_AUTHENTICATED_WRITE_ACCESS > will return EFI_UNSUPPORTED. > In the UEFI2.7 spec, there is a description as below: > EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should > not be > used. Platforms should return EFI_UNSUPPORTED if a caller to > SetVariable() specifies this attribute. > > Signed-off-by: JunX1 Li <[email protected]> > Reviewed-by: Liming Gao <[email protected]> > Reviewed-by: G Edhaya Chandran <[email protected]> > Reviewed-by: Samer El-Haj-Mahmoud <[email protected]> > Reviewed-by: Sunny Wang <[email protected]> > --- > MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > index 6c1a3440ac..14c176887a 100644 > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > @@ -2676,7 +2676,11 @@ VariableServiceSetVariable ( > // > // Only EFI_VARIABLE_NON_VOLATILE attribute is invalid > // > - return EFI_INVALID_PARAMETER; > + if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) > { > + return EFI_UNSUPPORTED; > + } else { > + return EFI_INVALID_PARAMETER; > + } > } else if ((Attributes & VARIABLE_ATTRIBUTE_AT_AW) != 0) { > if (!mVariableModuleGlobal->VariableGlobal.AuthSupport) { > // > -- > 2.26.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91052): https://edk2.groups.io/g/devel/message/91052 Mute This Topic: https://groups.io/mt/92176863/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
