Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1457328pxb; Tue, 8 Feb 2022 18:43:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZKoOy+wOjAMbN+XuqMvw+ULID67/TEO3EvqjZLm2UchNFhJJDXznN8WkFGUxwKek0f1EB X-Received: by 2002:a17:907:1b05:: with SMTP id mp5mr84918ejc.527.1644374617529; Tue, 08 Feb 2022 18:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644374617; cv=none; d=google.com; s=arc-20160816; b=mSxpF7tpVSHOgzBfJekp/W6g//KGMqnp1j/sJTCcsHN6J7ji2u57xu2JQZQxXVp8n4 IhkkowuSZbST9OXGGikrmQ14Q8k0FnJwA6gTvcRNMcdGu5ClAOaSqtkidQjYVzBjjX7F qZPn2AaXYi6e6N9sxp1W1qKt2o992ME5VFdBPkjr8qmXaXvxVxqCkRHRRxmHJubmjlxg 6/+IL15B2bqUjEHumPbZd4SZwCcLGvW4+6LyB7L5pXUUiFU94i7v0w7yA6XVHuFhXJAZ PKepsyoN9oeU9+Uh2Xi0NZ/W6Omqz3TAIR2s2GHqgAu8EY6Fyn7RQyptoUCU2wGmr9eb h2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ygzLBzDKLHofE05otKH6OmK2M1WLw/lhSVQ1mG+tjgM=; b=mGhDeHZvhimcMo/fy6xDlNes80Ve1q0oy+lRrEqbynlf8gBLDD/zPZn2ZnJT8rWeaY ir/jKSECUd3/5g0gxhWuMJ58sxCJDhyLOgBAQQ2bbfldHVfDG3ozzjioJoa6g7XMGQ3y Q++4lLs0AVJszMOFuc/uGOCq5VKv1rvhyIapbCIugWAFtCIrBeUzGPjGEvQ4bieaN5qN R25FcWMBy4hcwTEAgxrArLPQ296kgVFJQ7/GNxedUT6aq1F+UoXwT4mCCtSd5ar6m48n Wmznhv+OIIw4SspM5pY7PF2tXxwgvNOhiSCJiKjhIGfITua5uXhN+AGKXDtYXxTVnGmI f+Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GJz07wFv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cz8si2289192edb.465.2022.02.08.18.43.12; Tue, 08 Feb 2022 18:43:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GJz07wFv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388541AbiBHWdG (ORCPT + 99 others); Tue, 8 Feb 2022 17:33:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387026AbiBHVsu (ORCPT ); Tue, 8 Feb 2022 16:48:50 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2191C0612B8; Tue, 8 Feb 2022 13:48:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644356929; x=1675892929; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GGSyh+03q9qU11wHQlvx8iReUEq1xb52fNxWSqLbH+4=; b=GJz07wFvA+IoPPsN9IpyuJWWA/A2v0qbbQGPLgU/LoNFALHXmV9Ue2nN 2K0Occf/hrS1cXd7PrKi72PB7wLpvkEJuyYW7WL0k5vW3BJNGsGySe11W nvNG5VwXnKmodjasmjYrgcSf/yC1gsetZq/dtOUdFOUybOZfOmSB0dO7B YPZDQj1vbUF/h56K9QtfqRgOBwfARR/shTyMH41P9UYUUTs2DeN44/s+z 8a3WrHZBXcgPg5PsFd6jyGVD9Sv4YMeXHH/hSUEt7d/ZrdaMOG82MPQnz uXgjWOcitxNnrkUccR2scjkK322pK0oyJetO2gSlwjnFebTfpgHBe7Sal g==; X-IronPort-AV: E=McAfee;i="6200,9189,10252"; a="309805365" X-IronPort-AV: E=Sophos;i="5.88,353,1635231600"; d="scan'208";a="309805365" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2022 13:48:49 -0800 X-IronPort-AV: E=Sophos;i="5.88,353,1635231600"; d="scan'208";a="632992863" Received: from rchatre-ws.ostc.intel.com ([10.54.69.144]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2022 13:48:49 -0800 From: Reinette Chatre To: dave.hansen@linux.intel.com, jarkko@kernel.org, tglx@linutronix.de, bp@alien8.de, luto@kernel.org, mingo@redhat.com, linux-sgx@vger.kernel.org, x86@kernel.org, shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 0/4] selftests/sgx: Early enclave loading error path fixes Date: Tue, 8 Feb 2022 13:48:38 -0800 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes since V2: - V2: https://lore.kernel.org/linux-sgx/cover.1643754040.git.reinette.chatre@intel.com/ - Added Acked-by from Shuah to all patches in series. - Shuah is ok with these entering the kernel via tip.git: https://lore.kernel.org/linux-sgx/e188c62e-f75e-2bec-b544-76063098611d@linuxfoundation.org/ - Include x86@kernel.org and more x86 maintainers since goal is for inclusion into tip.git. Changes since V1: - V1: https://lore.kernel.org/linux-sgx/cover.1643393473.git.reinette.chatre@intel.com/ - All changes impact the commit messages only, no changes to code. - Rewrite commit message of 1/4 (Dave). - Detail in 2/4 commit log what callers will see with this change (Dave). - Add Acked-by from Dave to 2/4 and 4/4. Hi Everybody, Please find included a few fixes that address problems encountered after venturing into the enclave loading error handling code of the SGX selftests. Reinette Reinette Chatre (4): selftests/sgx: Fix NULL-pointer-dereference upon early test failure selftests/sgx: Do not attempt enclave build without valid enclave selftests/sgx: Ensure enclave data available during debug print selftests/sgx: Remove extra newlines in test output tools/testing/selftests/sgx/load.c | 9 +++++---- tools/testing/selftests/sgx/main.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) -- 2.25.1