From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.50]) by mx.groups.io with SMTP id smtpd.web09.7174.1634811538963389430 for ; Thu, 21 Oct 2021 03:19:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=yHODxNRk; spf=pass (domain: arm.com, ip: 40.107.3.50, mailfrom: sunny.wang@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SntnwqtrOLbrNwoHuK7wvp2Gsg1qreE8rPzZ1QNw1gs=; b=yHODxNRkKwPjWcolNfZzWQxhPJ/7JmyvweUCUCFGUgQjlLbJ8QaFm4FE7o0lUfElWQrJecKf46+yM3CDsWpzHkhvdTs3xVZPVzm+4jZ6wvn8YtayJ6kfgCQ/d06sVUwTESTifNmQ/nnDKbA2AQqJB7qEVnwiMbEpduySsrsuvys= Received: from AS9PR06CA0417.eurprd06.prod.outlook.com (2603:10a6:20b:461::21) by PA4PR08MB6224.eurprd08.prod.outlook.com (2603:10a6:102:e7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Thu, 21 Oct 2021 10:18:55 +0000 Received: from VE1EUR03FT061.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:461:cafe::6e) by AS9PR06CA0417.outlook.office365.com (2603:10a6:20b:461::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Thu, 21 Oct 2021 10:18:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT061.mail.protection.outlook.com (10.152.19.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18 via Frontend Transport; Thu, 21 Oct 2021 10:18:55 +0000 Received: ("Tessian outbound d5def7722ff7:v103"); Thu, 21 Oct 2021 10:18:54 +0000 X-CR-MTA-TID: 64aa7808 Received: from 95abf56fe09b.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C1793F12-BD0A-4446-963E-A09B48B76A50.1; Thu, 21 Oct 2021 10:18:44 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 95abf56fe09b.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 21 Oct 2021 10:18:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eRD5j4QiTKFWE7yVj6LCfxWKEOUQXoCAYJdoXgdNwUG0LNXSfMGsu6WkyNi3XS3qq0fx1qSnRwglE9LpaLdYNW1RQSx3qjfjy3GKRSEEeElY4Ec3cSJKn4FWWmJKPpf3elvdnmfOdbL/IZENv0OZ+fRLLo79DfrKv9l59YMRBrbHgNCRkmdMYaUtWEE/gyZP754ORjyf+vghviE3Weh4qWK8ijFK0gopJ8nIM4JAwKS94T25ZwgqT+e5Uo7ajscEtIpL91q1NkqExschPA4xiOC1JEKCyvV7SCIzO5xKM7zK7JYUOKYidBSVOIvb8i757wEncdKqJyf2i7VIEBoCmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SntnwqtrOLbrNwoHuK7wvp2Gsg1qreE8rPzZ1QNw1gs=; b=anf+o63kGchotdtDPwns2gXHPQrcs3GaGkUhte0OEhF5WwXOpzGAP/s57dn2YFR1fOL1WB6zcxD5zPbnmzHdihXPDLkoN2aUICvqoQhC1/aFALAW7nr/pxahGTwSshNtapsXtbMyV3DKP/N8YMHxyNX2s2wd/VNtTxWqrYgo5rb+dnOXGXUTJuuTeZ/ja1hiWCpU1qTRoY6n4OKZzobPpxEPHAQ6JZ0SvegXjpfYZnpFru1urJbqrr2/29J0c62bD4DA12TU1Ua1LDSOPAGmWMVviLhbSpofppaW4FgkheMh74CFJ9rBIgZU9bWbml+Mtf5axyl4dGXjrVUUylmAFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SntnwqtrOLbrNwoHuK7wvp2Gsg1qreE8rPzZ1QNw1gs=; b=yHODxNRkKwPjWcolNfZzWQxhPJ/7JmyvweUCUCFGUgQjlLbJ8QaFm4FE7o0lUfElWQrJecKf46+yM3CDsWpzHkhvdTs3xVZPVzm+4jZ6wvn8YtayJ6kfgCQ/d06sVUwTESTifNmQ/nnDKbA2AQqJB7qEVnwiMbEpduySsrsuvys= Received: from DB8PR08MB3993.eurprd08.prod.outlook.com (2603:10a6:10:ad::26) by DB9PR08MB6891.eurprd08.prod.outlook.com (2603:10a6:10:2a6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Thu, 21 Oct 2021 10:18:41 +0000 Received: from DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::3da0:641e:7ff0:e026]) by DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::3da0:641e:7ff0:e026%6]) with mapi id 15.20.4628.018; Thu, 21 Oct 2021 10:18:41 +0000 From: "Sunny Wang" To: "Wu, Hao A" , gaoliming , edk2-devel-groups-io CC: Samer El-Haj-Mahmoud , Sunny Wang , G Edhaya Chandran , "xypron.glpk@gmx.de" Subject: Return EFI_INVALID_PARAMETER if attribute only has EFI_VARIABLE_NON_VOLATILE set Thread-Topic: Return EFI_INVALID_PARAMETER if attribute only has EFI_VARIABLE_NON_VOLATILE set Thread-Index: AdfGXDPktFBsezAsQXGBjffdIBo7Mw== Date: Thu, 21 Oct 2021 10:18:40 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 9E68C7B005C93D458841911E48F75905.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 863e3346-37b8-41f6-b20d-08d9947c3010 x-ms-traffictypediagnostic: DB9PR08MB6891:|PA4PR08MB6224: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wVJcvqBJj+3Z3cCodVRRpGqhSeJwAa8ju5wztA+50qcOe+Khi+S/aJD4l6ZBkyQIMCSontEaBVq+zvclCfjX1z67HEKUZAFraLVVP8r99CLPdWvTJ2OQN03sFGa9cPmMC5n61Ymw0+P5pSRkgHAmni8gZljTgeAilJwNwmiFDYytOhFAHi1MxicmEmMoj4PVd8FuvdCWisfGErEAThI1o4s+sy0d1GAQ2ZsSTsDaTe25a+XcI56eO76FSv+lU+07Q3dp5ZFtXVi5OJli53AprumUJ1b675d7XtgtvRif6tx4X0b6IztOzHxtZtQeWaKgtyCgD3D+o4aKvyMIgV4sKEJ4gnI9KKeOgFE19Yo3BBMMw9lG+TWP7GOjVGwPnK8kNCO2vqfHRpmHH5Sp2o5FRFowEuVzvQu8LNrxaJEsUTJctnzv2qARzPGdupZVi6gQPFsx5BcOL0lFHLJhT9EKQdg3ZssTuoIMeqr3JAvZXbCp14r4t/4yLDQaK3YpUwydKC2NvAoCPW41qkRfD3ENtQbvyYOjk8M69DGp78DJsQ2ut4n7fmGHrWQhua5Fq/tGd0Xio4VDZMsiqH7iPUcGijJUis8+K1u5sRdaBZP9ndy6gZoIktJ/oQReP+gTob1n/0iW+EExphzjeYBsqc/8uFFzbGIUG6nFrAFYxFcN2qSIDxOTb1p4u6gxgFJyQC+/Cm4SLtWhEOLBIlxair7ZZlss+HMO35g2RYSiwOnK8IvCzEzfWE8wOySTm2Q0RBEouMmovy/TRqN0qj0Ctft40YmdmCdXwtzctg7MpVmuasg= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR08MB3993.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38070700005)(66556008)(33656002)(71200400001)(186003)(83380400001)(54906003)(6506007)(4326008)(86362001)(5660300002)(66446008)(8676002)(66476007)(64756008)(110136005)(7696005)(52536014)(8936002)(508600001)(76116006)(9686003)(66946007)(38100700002)(122000001)(2906002)(55016002)(966005)(316002)(166002)(26005);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6891 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sunny.Wang@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT061.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5cc5af3a-620e-4e13-8e6c-08d9947c2798 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pWK45eHy+1jC6ln+COOhlVceWGPNwRP4QSUJxh9nlKHhb6wP9ThL/yj1Qp42FDv/MsdL+sUMdO2rN+/+I1cKzrYUCOxAiOLemFA2qpbuHhO6oiXkNnYOqmVWO7wo4YzGCoDuQaiWt2TjzLO0Lf0mLZDsH/erl8D64Kk7JNhJa3OSRam88sO3A9gqLUMZeAXaw7lT7/yk/eKSZw0sZaRisbBs0U82rO3EL2KJ+uQJrHAPOPoxyn/1tOQAmXt8CesY60JiYVSR61y5YXeKYO+bIQpQB+RdfTt/HAx8ZPt5ggmBtKVd8uU4yqCGtyC/luaQbevl1BWLkFIv2Erz2g52ofSosd/g2npNEMLzVCDxZlD7qCr1T21rwcACytpbF0dA2NM5oTWt9TdBbGODp7V8mJF5lCGXgSwL/9e+Tf7Lhi9AtjQlGH2Ij5wi9JJnYzB1ghHnsee894PLc1tucTiWltk+jYPa0LVaAX+qRvwg6iFpDH2oGxdWbIe64PNn6S507H0wDDnHucaqQJZo9Xp4FOBCwpjspxKdYB6Tf9fCRoriWKAti6RVWAOJIb4b/PLvRDZlrwwN5kUPaOPtrLI74BNGgUV7qfgSZCvwVperEYLm/el84mHY9MlGT31D4TApVAo2P5Ot3XNNbE6BglZ2yqJeUsmy+XIMB05K5qP35tFzb3wfiAlmoXh0/01kjtKsWm3/h9yeY/CEhcJXjSJVNpTUZNikAiTS0N+cpgCyYbRb9vPKsPXUCkCJN75tQEsWFR1ItG81xWpdzsEYyxVqbamvKVg73BGfs6UmQ/sOsTA= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(54906003)(70586007)(86362001)(186003)(966005)(9686003)(356005)(316002)(336012)(166002)(2906002)(26005)(110136005)(6506007)(33656002)(4326008)(55016002)(8936002)(81166007)(82310400003)(52536014)(83380400001)(508600001)(5660300002)(36860700001)(47076005)(7696005)(8676002)(70206006);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2021 10:18:55.1842 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 863e3346-37b8-41f6-b20d-08d9947c3010 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT061.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6224 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DB8PR08MB3993369FB3983ECAEA7BAF1685BF9DB8PR08MB3993eurp_" --_000_DB8PR08MB3993369FB3983ECAEA7BAF1685BF9DB8PR08MB3993eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Liming, Hao, and all Now we're checking the SCT runtime variable service test case. https://gith= ub.com/tianocore/edk2-test/blob/92a0343c1553342c53fae9d9d646b763add232c0/ue= fi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTe= st/VariableServicesBBTestConformance.c#L3401 and have a question below. Is there any use case to call the runtime variable service functions with t= he Attributes that only has EFI_VARIABLE_NON_VOLATILE set? We checked UEFI spec, documents, and current EDK2 implementation. There is = no specific description or any implementation for this. However, there seem= s an implication that EFI_VARIABLE_NON_VOLATILE must be set with at least E= FI_VARIABLE_BOOTSERVICE_ACCESS. Actually, it looks like making NO sense to= have a variable attribute combination that doesn't have any XXXXX_ACCESS a= ttribute (BS, RT, or AT) set. Therefore, we think only having EFI_VARIABLE_NON_VOLATILE set may be an inv= alid case and would like to add a check into the EDK2 variable driver to re= turn EFI_INVALID_PARAMETER. What do you guys think? Best Regards, Sunny IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you. --_000_DB8PR08MB3993369FB3983ECAEA7BAF1685BF9DB8PR08MB3993eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Liming, Hao, and all

 

Now we’re checking the SCT runtime variable se= rvice test case. https://github.com/tianocore/edk2-test/blob/92a0343c1553342c53fae9d9d646b76= 3add232c0/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableService= s/BlackBoxTest/VariableServicesBBTestConformance.c#L3401 and have a que= stion below.

 

Is there any use case to call the runtime variable s= ervice functions with the Attributes that only has EFI_VARIABLE_NON_VOLATIL= E set?

 

We checked UEFI spec, documents, and current EDK2 im= plementation. There is no specific description or any implementation for th= is. However, there seems an implication that EFI_VARIABLE_NON_VOLATILE must= be set with at least EFI_VARIABLE_BOOTSERVICE_ACCESS.  Actually, it looks like making NO sense to have a variable attribute= combination that doesn’t have any XXXXX_ACCESS attribute (BS, RT, or= AT) set.

 

Therefore, we think only having EFI_VARIABLE_NON_VOL= ATILE set may be an invalid case and would like to add a check into the EDK= 2 variable driver to return EFI_INVALID_PARAMETER.  What do you guys t= hink?

 

Best Regards,

Sunny

 

 

 

 

IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in any medium. Thank you. --_000_DB8PR08MB3993369FB3983ECAEA7BAF1685BF9DB8PR08MB3993eurp_--