From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 14819D8119E for ; Thu, 15 Feb 2024 03:31:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ST3OAhmHa6DEvi02IXZYl1XOrZI0b53BqhTBGn+PIic=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1707967896; v=1; b=HYmmKzxAi1VlKs8mD+sAr287/QdTPk7zKi+fQpqniTA6NIedDAPrEamSKDM+UvQkpnFRfD/B nlkDKdX/DPr5dn/rJYkdj2TQcqrtgkJ8gGNrrIiJkRHtHYKMPf+S6alfNUe+G1eRHiYR8I8odSz qBcqylegzjlMJriArtOhcefQ= X-Received: by 127.0.0.2 with SMTP id YZ6PYY7687511xTGtQR3aRAQ; Wed, 14 Feb 2024 19:31:36 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.6454.1707967895722870299 for ; Wed, 14 Feb 2024 19:31:35 -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 1B96414BF; Wed, 14 Feb 2024 19:32:16 -0800 (PST) X-Received: from beelzebub.ast.arm.com (abhsin07-ThinkStation-P720.austin.arm.com [10.118.30.31]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 553473F7B4; Wed, 14 Feb 2024 19:31:35 -0800 (PST) From: "Abhimanyu Singh" To: devel@edk2.groups.io Cc: Abhi Singh , G Edhaya Chandran , Barton Gao , Carolyn Gjertsen , Stuart Yoder , Abhi Singh Subject: [edk2-devel] [PATCH v3 7/7] uefi-sct/SctPkg: TCG MOR & MORLOCK tests Date: Wed, 14 Feb 2024 21:30:56 -0600 Message-Id: <20240215033056.331060-8-Abhi.Singh@arm.com> In-Reply-To: <20240215033056.331060-1-Abhi.Singh@arm.com> References: <20240215033056.331060-1-Abhi.Singh@arm.com> MIME-Version: 1.0 Precedence: Bulk 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,Abhi.Singh@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 3fFggZnLDHrQA0gDvLXI5Fsnx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=HYmmKzxA; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none) SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4419 -relax acceptable EFI return codes to fit the edk2 implementation as well as the updates made to TCG Platform Reset Attack Spec. -changes made to test assertions 11, 31, and 45. -now accept either EFI_INVALID_PARAMETER or EFI_ACCESS_DENIED. Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Cc: Stuart Yoder Signed-off-by: Abhi Singh --- uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteReques= t/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOve= rwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c b/uefi= -sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/Bla= ckBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c index 6406730c64ce..cbf3de3144ca 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteR= equest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteR= equest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c @@ -819,7 +819,7 @@ MORLOCK_SET_VARIABLE: DataSize, // DataSize= =0D NULL // Data=0D );=0D - if (Status =3D=3D EFI_INVALID_PARAMETER) {=0D + if (Status =3D=3D EFI_WRITE_PROTECTED || EFI_INVALID_PARAMETER) {=0D Result =3D EFI_TEST_ASSERTION_PASSED;=0D } else {=0D Result =3D EFI_TEST_ASSERTION_FAILED;=0D @@ -829,7 +829,7 @@ MORLOCK_SET_VARIABLE: StandardLib,=0D Result,=0D gTCGMemoryOverwriteRequestTestFunctionAssertionGuid011,= =0D - L"MemoryOverwriteRequestControlLock - SetVariable() with= Data parameter as NULL returns EFI_WRITE_PROTECTED",=0D + L"MemoryOverwriteRequestControlLock - SetVariable() with= Data parameter as NULL returns either EFI_WRITE_PROTECTED or EFI_INVALID_P= ARAMETER",=0D L"%a:%d:Status - %r",=0D __FILE__,=0D (UINTN)__LINE__,=0D @@ -1624,7 +1624,7 @@ MORLOCK_LOCKED_STATE: DataSize, // DataSize=0D &MemoryOverwriteRequestControlData // Data=0D );=0D - if (Status =3D=3D EFI_ACCESS_DENIED) {=0D + if (Status =3D=3D EFI_ACCESS_DENIED || EFI_INVALID_PARAMETER) {=0D Result =3D EFI_TEST_ASSERTION_PASSED;=0D } else {=0D Result =3D EFI_TEST_ASSERTION_FAILED;=0D @@ -1634,7 +1634,7 @@ MORLOCK_LOCKED_STATE: StandardLib,=0D Result,=0D gTCGMemoryOverwriteRequestTestFunctionAssertionGuid031,= =0D - L"MemoryOverwriteRequestControl - When MORLOCK is locked= -without-key, an attempt to delete the MOR variable must return EFI_ACCESS_= DENIED",=0D + L"MemoryOverwriteRequestControl - When MORLOCK is locked= -without-key, an attempt to delete the MOR variable must return either EFI_= ACCESS_DENIED or EFI_INVALID_PARAMETER",=0D L"%a:%d:Status - %r",=0D __FILE__,=0D (UINTN)__LINE__,=0D @@ -2148,7 +2148,7 @@ MORLOCK_LOCKED_KEY_STATE: DataSize, // DataSize=0D &MemoryOverwriteRequestControlData // Data=0D );=0D - if (Status =3D=3D EFI_ACCESS_DENIED) {=0D + if (Status =3D=3D EFI_ACCESS_DENIED || EFI_INVALID_PARAMETER) {=0D Result =3D EFI_TEST_ASSERTION_PASSED;=0D } else {=0D Result =3D EFI_TEST_ASSERTION_FAILED;=0D @@ -2158,7 +2158,7 @@ MORLOCK_LOCKED_KEY_STATE: StandardLib,=0D Result,=0D gTCGMemoryOverwriteRequestTestFunctionAssertionGuid045,= =0D - L"MemoryOverwriteRequestControl - When MORLOCK is locked= -with-key, an attempt to delete the MOR variable must return EFI_ACCESS_DEN= IED",=0D + L"MemoryOverwriteRequestControl - When MORLOCK is locked= -with-key, an attempt to delete the MOR variable must return either EFI_ACC= ESS_DENIED or EFI_INVALID_PARAMETER",=0D L"%a:%d:Status - %r",=0D __FILE__,=0D (UINTN)__LINE__,=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115485): https://edk2.groups.io/g/devel/message/115485 Mute This Topic: https://groups.io/mt/104367136/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-