From: "Abhimanyu Singh" <Abhi.Singh@arm.com>
To: devel@edk2.groups.io
Cc: Abhi Singh <Abhi.Singh@arm.com>,
G Edhaya Chandran <Edhaya.Chandran@arm.com>,
Barton Gao <gaojie@byosoft.com.cn>,
Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>,
Stuart Yoder <Stuart.Yoder@arm.com>,
Abhi Singh <abhi.singh@arm.com>
Subject: [edk2-devel] [PATCH v2 7/7] uefi-sct/SctPkg: TCG MOR & MORLOCK tests
Date: Tue, 30 Jan 2024 17:23:32 -0600 [thread overview]
Message-ID: <20240130232332.235302-8-Abhi.Singh@arm.com> (raw)
In-Reply-To: <20240130232332.235302-1-Abhi.Singh@arm.com>
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419
-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 <Edhaya.Chandran@arm.com>
Cc: Barton Gao <gaojie@byosoft.com.cn>
Cc: Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>
Cc: Stuart Yoder <Stuart.Yoder@arm.com>
Signed-off-by: Abhi Singh <abhi.singh@arm.com>
Change-Id: I54b9b751ae166b0921500eabb38e1836318bb501
---
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
index 6406730c64ce..512cad3df6ee 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
@@ -819,7 +819,7 @@ MORLOCK_SET_VARIABLE:
DataSize, // DataSize
NULL // Data
);
- if (Status == EFI_INVALID_PARAMETER) {
+ if (Status == EFI_WRITE_PROTECTED || EFI_INVALID_PARAMETER) {
Result = EFI_TEST_ASSERTION_PASSED;
} else {
Result = EFI_TEST_ASSERTION_FAILED;
@@ -829,7 +829,7 @@ MORLOCK_SET_VARIABLE:
StandardLib,
Result,
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid011,
- L"MemoryOverwriteRequestControlLock - SetVariable() with Data parameter as NULL returns EFI_WRITE_PROTECTED",
+ L"MemoryOverwriteRequestControlLock - SetVariable() with Data parameter as NULL returns either EFI_WRITE_PROTECTED or EFI_INVALID_PARAMETER",
L"%a:%d:Status - %r",
__FILE__,
(UINTN)__LINE__,
@@ -1624,7 +1624,7 @@ MORLOCK_LOCKED_STATE:
DataSize, // DataSize
&MemoryOverwriteRequestControlData // Data
);
- if (Status == EFI_ACCESS_DENIED) {
+ if (Status == EFI_ACCESS_DENIED || EFI_INVALID_PARAMETER) {
Result = EFI_TEST_ASSERTION_PASSED;
} else {
Result = EFI_TEST_ASSERTION_FAILED;
@@ -1634,7 +1634,7 @@ MORLOCK_LOCKED_STATE:
StandardLib,
Result,
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid031,
- L"MemoryOverwriteRequestControl - When MORLOCK is locked-without-key, an attempt to delete the MOR variable must return EFI_ACCESS_DENIED",
+ 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",
L"%a:%d:Status - %r",
__FILE__,
(UINTN)__LINE__,
@@ -2148,7 +2148,7 @@ MORLOCK_LOCKED_KEY_STATE:
DataSize, // DataSize
&MemoryOverwriteRequestControlData // Data
);
- if (Status == EFI_ACCESS_DENIED) {
+ if (Status == EFI_ACCESS_DENIED || EFI_INVALID_PARAMETER) {
Result = EFI_TEST_ASSERTION_PASSED;
} else {
Result = EFI_TEST_ASSERTION_FAILED;
@@ -2158,7 +2158,7 @@ MORLOCK_LOCKED_KEY_STATE:
StandardLib,
Result,
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid045,
- L"MemoryOverwriteRequestControl - When MORLOCK is locked-with-key, an attempt to delete the MOR variable must return EFI_ACCESS_DENIED",
+ 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",
L"%a:%d:Status - %r",
__FILE__,
(UINTN)__LINE__,
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114838): https://edk2.groups.io/g/devel/message/114838
Mute This Topic: https://groups.io/mt/104065289/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-01-30 23:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 23:23 [edk2-devel] [PATCH v2 0/7] EDK2-TEST TCG MOR Tests Abhimanyu Singh
2024-01-30 23:23 ` [edk2-devel] [PATCH v2 1/7] uefi-sct/SctPkg: TCG Platform Reset Check Test Abhimanyu Singh
2024-01-30 23:23 ` [edk2-devel] [PATCH v2 2/7] uefi-sct/SctPkg: TCG MOR SetVariable Test Abhimanyu Singh
2024-01-30 23:23 ` [edk2-devel] [PATCH v2 3/7] uefi-sct/SctPkg: TCG MORLOCK " Abhimanyu Singh
2024-01-30 23:23 ` [edk2-devel] [PATCH v2 4/7] uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test Abhimanyu Singh
2024-01-30 23:23 ` [edk2-devel] [PATCH v2 5/7] uefi-sct/SctPkg: TCG MORLOCK Locked No Key " Abhimanyu Singh
2024-01-30 23:23 ` [edk2-devel] [PATCH v2 6/7] uefi-sct/SctPkg: TCG MORLOCK Locked with " Abhimanyu Singh
2024-01-30 23:23 ` Abhimanyu Singh [this message]
2024-02-14 16:33 ` [edk2-devel] [PATCH v2 0/7] EDK2-TEST TCG MOR Tests Stuart Yoder
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=20240130232332.235302-8-Abhi.Singh@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