From nobody Sun Jun 28 05:35:07 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4817CC433EF for ; Fri, 11 Feb 2022 22:00:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244180AbiBKWA0 (ORCPT ); Fri, 11 Feb 2022 17:00:26 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245258AbiBKWAT (ORCPT ); Fri, 11 Feb 2022 17:00:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BD16C74; Fri, 11 Feb 2022 14:00:17 -0800 (PST) Date: Fri, 11 Feb 2022 22:00:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1644616815; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pWFu/sLaMqy4EBO4xh38pYAaJOx0SMnJHEATCu4s7k0=; b=cQjQERsloCphD/91gnp3sg3MGT1LUoPwul/uZvGdxWmfF/15WJTKBLoowmfNLUktS/fq71 1M9BlHRUaX+bLt8K1OU8U72FyxII1/YCZ4UCvXxQ1XYkWgkIn1n9D6z18A8fZu/32Jq9r1 pPFiLjZ2l+QlLu27OuwfzaOhSai5fGISx/cSclc8+OhEUu40Hfhpl9szaJuy+lKhtMafDx idQCmjlC4n9EGJ7lY4XYEH0UErzDzg4+zmoGeyJZpjO0Av5YDLSVvzbLsjuOaMgklf7Fcy YC70ATZIz/eorY98ZkPmkU+dozLeoOZJvfk6E5Vq4fd6E0kTU4IaCWholCBVfA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1644616815; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pWFu/sLaMqy4EBO4xh38pYAaJOx0SMnJHEATCu4s7k0=; b=IvQHViznau46bqG7btNnvLi8PwoPefeCpmvCpefP8fV6bFzipqlc2I29O8PnE1bi5cW+KZ JbmsOth/TrYlq4Dg== From: "tip-bot2 for Reinette Chatre" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/sgx] selftests/sgx: Do not attempt enclave build without valid enclave Cc: Reinette Chatre , Dave Hansen , Shuah Khan , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3Ce3778c77f95e6dca348c732b12f155051d2899b4=2E16443?= =?utf-8?q?55600=2Egit=2Ereinette=2Echatre=40intel=2Ecom=3E?= References: =?utf-8?q?=3Ce3778c77f95e6dca348c732b12f155051d2899b4=2E164435?= =?utf-8?q?5600=2Egit=2Ereinette=2Echatre=40intel=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <164461681421.16921.5423219410361337915.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/sgx branch of tip: Commit-ID: fff36bcbfde1126f6b81cb8ee12a58aada17ca29 Gitweb: https://git.kernel.org/tip/fff36bcbfde1126f6b81cb8ee12a58aad= a17ca29 Author: Reinette Chatre AuthorDate: Tue, 08 Feb 2022 13:48:40 -08:00 Committer: Dave Hansen 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 Signed-off-by: Dave Hansen Acked-by: Dave Hansen Acked-by: Shuah Khan Link: https://lkml.kernel.org/r/e3778c77f95e6dca348c732b12f155051d2899b4.16= 44355600.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/s= gx/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, st= ruct 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; } =20 if (!encl_measure(encl))