From: "Stuart Yoder" <stuart.yoder@arm.com>
To: devel@edk2.groups.io
Cc: gaoliming@byosoft.com.cn, hao.a.wu@intel.com, Sunny.Wang@arm.com
Subject: [PATCH] MdeModulePkg/Variable: Attribute combination should return EFI_UNSUPPORTED
Date: Thu, 9 Feb 2023 16:30:58 -0600 [thread overview]
Message-ID: <20230209223058.199878-1-stuart.yoder@arm.com> (raw)
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 <gaoliming@byosoft.com.cn>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Sunny Wang <Sunny.Wang@arm.com>
Signed-off-by: Stuart Yoder <stuart.yoder@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
next reply other threads:[~2023-02-09 22:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 22:30 Stuart Yoder [this message]
2023-02-10 2:37 ` [edk2-devel] [PATCH] MdeModulePkg/Variable: Attribute combination should return EFI_UNSUPPORTED Michael D Kinney
2023-02-10 5:15 ` 回复: " gaoliming
2023-02-13 10:42 ` Sunny Wang
2023-02-15 3:42 ` 回复: [edk2-devel] " gaoliming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230209223058.199878-1-stuart.yoder@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox