Liming, This appears to be a regression from a commit on Jan 11, 2023.
I think this should be considered for edk2-stable202302 Mike > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Stuart Yoder > Sent: Thursday, February 9, 2023 2:31 PM > To: devel@edk2.groups.io > Cc: Gao, Liming <gaolim...@byosoft.com.cn>; Wu, Hao A <hao.a...@intel.com>; > sunny.w...@arm.com > Subject: [edk2-devel] [PATCH] MdeModulePkg/Variable: Attribute combination > should return EFI_UNSUPPORTED > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4341 > > Commit 21320ef66989 broke some tests in the AuthVar_Conf test > in edk2-test. There are 2 testcases that invoke SetVariable > with the following attribute value: > > (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) > > EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and the UEFI spec > says this should return EFI_UNSUPPORTED. > > Cc: Liming Gao <gaolim...@byosoft.com.cn> > Cc: Hao A Wu <hao.a...@intel.com> > Cc: Sunny Wang <sunny.w...@arm.com> > > Signed-off-by: Stuart Yoder <stuart.yo...@arm.com> > --- > 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.34.1 > > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#99932): https://edk2.groups.io/g/devel/message/99932 > Mute This Topic: https://groups.io/mt/96864645/1643496 > Group Owner: devel+ow...@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [michael.d.kin...@intel.com] > -=-=-=-=-=-= > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#99944): https://edk2.groups.io/g/devel/message/99944 Mute This Topic: https://groups.io/mt/96864645/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-