From nobody Tue May 21 23:36:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+99932+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+99932+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1675981871; cv=none; d=zohomail.com; s=zohoarc; b=i7vtDOCVFdM9y6qxKPMNujAAf55UjlhGs0qcw8zWKXx3Mp+1imKWmZWfbMURBgc6oZ9fiz8Ru2WUBjzz+UasWHOlPi0W5exNgXpaZr4QVRWLFq6/+5BwZNxHh16IJz0vpfn5bN9m/sexADM+X0bHDu0Mtg6kG9ifOsLanahvG3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675981871; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=SdUolGUawnK092UHcW5GY2Kf950QH5HzHUFUF2v91Zk=; b=iU7RCbrLXbJjPAeenaRWgVwVKn3IyDmM7UJwz6pK8Hn7Y56u/x0XkVNtD8zr/+1e9fZOsgoRLGUuQLsp+7kL0+bwVRm804VvfUoKzx0+Tm/QOOFzxClCYT/H3B3iCnI9Yznpi4QdPDJ/GSRuIukLV2zAZsfLGA90KHL34VUxEco= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+99932+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1675981871436944.961331674476; Thu, 9 Feb 2023 14:31:11 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id CzzbYY1788612xCkKJMPVScY; Thu, 09 Feb 2023 14:31:10 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.91.1675981870022158431 for ; Thu, 09 Feb 2023 14:31:10 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E3E602F4; Thu, 9 Feb 2023 14:31:51 -0800 (PST) X-Received: from beelzebub.ast.arm.com (unknown [10.118.28.31]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 646C83F8C6; Thu, 9 Feb 2023 14:31:09 -0800 (PST) From: "Stuart Yoder" To: devel@edk2.groups.io Cc: gaoliming@byosoft.com.cn, hao.a.wu@intel.com, Sunny.Wang@arm.com Subject: [edk2-devel] [PATCH] MdeModulePkg/Variable: Attribute combination should return EFI_UNSUPPORTED Date: Thu, 9 Feb 2023 16:30:58 -0600 Message-Id: <20230209223058.199878-1-stuart.yoder@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,stuart.yoder@arm.com X-Gm-Message-State: NmgfcIoljC4V5Tm7RISLvfiZx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1675981870; bh=viqmP3jXJMj9cy6DzMsB2o/NqVT2dgjTAzJv3xEmOsQ=; h=Cc:Date:From:Reply-To:Subject:To; b=vKCBIRLxySYiV1hR+NuVYbNVjlrXZWheK+XJ5bXKGxQgHVu4eQxgFmY2RjlV658UspC N1+Gw1SjLjWozqinPgy3sEEVMjGSoyafkSQTeSO8YqnvU8UgeXrEHn2sdv+ED2tFF8hQI jKaV/2oP7B4Bi/5ZoSL3MsX0g9G4tjfQnj0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1675981872901100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4341 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 Cc: Hao A Wu Cc: Sunny Wang Signed-off-by: Stuart Yoder Reviewed-by: Sunny Wang --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeMod= ulePkg/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) !=3D 0) { + return EFI_UNSUPPORTED; + } else { + return EFI_INVALID_PARAMETER; + } } else if ((Attributes & VARIABLE_ATTRIBUTE_AT_AW) !=3D 0) { if (!mVariableModuleGlobal->VariableGlobal.AuthSupport) { // --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-