[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <164461681421.16921.5423219410361337915.tip-bot2@tip-bot2>
Date: Fri, 11 Feb 2022 22:00:14 -0000
From: "tip-bot2 for Reinette Chatre" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Reinette Chatre <reinette.chatre@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Shuah Khan <skhan@...uxfoundation.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/sgx] selftests/sgx: Do not attempt enclave build without
valid enclave
The following commit has been merged into the x86/sgx branch of tip:
Commit-ID: fff36bcbfde1126f6b81cb8ee12a58aada17ca29
Gitweb: https://git.kernel.org/tip/fff36bcbfde1126f6b81cb8ee12a58aada17ca29
Author: Reinette Chatre <reinette.chatre@...el.com>
AuthorDate: Tue, 08 Feb 2022 13:48:40 -08:00
Committer: Dave Hansen <dave.hansen@...ux.intel.com>
CommitterDate: Fri, 11 Feb 2022 13:52:47 -08:00
selftests/sgx: Do not attempt enclave build without valid enclave
It is not possible to build an enclave if it was not possible to load
the binary from which it should be constructed. Do not attempt
to make further progress but instead return with failure. A
"return false" from setup_test_encl() is expected to trip an
ASSERT_TRUE() and abort the rest of the test.
Fixes: 1b35eb719549 ("selftests/sgx: Encpsulate the test enclave creation")
Signed-off-by: Reinette Chatre <reinette.chatre@...el.com>
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Acked-by: Dave Hansen <dave.hansen@...ux.intel.com>
Acked-by: Shuah Khan <skhan@...uxfoundation.org>
Link: https://lkml.kernel.org/r/e3778c77f95e6dca348c732b12f155051d2899b4.1644355600.git.reinette.chatre@intel.com
---
tools/testing/selftests/sgx/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/sgx/main.c b/tools/testing/selftests/sgx/main.c
index 370c499..a7cd2c3 100644
--- a/tools/testing/selftests/sgx/main.c
+++ b/tools/testing/selftests/sgx/main.c
@@ -147,6 +147,7 @@ static bool setup_test_encl(unsigned long heap_size, struct encl *encl,
if (!encl_load("test_encl.elf", encl, heap_size)) {
encl_delete(encl);
TH_LOG("Failed to load the test enclave.\n");
+ return false;
}
if (!encl_measure(encl))
Powered by blists - more mailing lists