From patchwork Wed Feb 14 22:18:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Philipson X-Patchwork-Id: 201152 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp23197dyb; Wed, 14 Feb 2024 14:33:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXkLApoOBkNQCIEeUqQUeKHOIAu/eQ2SikYJIi6DBG3GOZm4QbJI5FyLS3/NsbC7NrTtcbSI8a8vegZVkU0vJz7v/BuMA== X-Google-Smtp-Source: AGHT+IGCpr6+osAHt6mahSZuaweX01Q5WBcNJRnBJjwYqXgEKFVVbHYpykucaqT+tVZV71YYMtqR X-Received: by 2002:a25:fc02:0:b0:dc6:bbbd:d4f4 with SMTP id v2-20020a25fc02000000b00dc6bbbdd4f4mr3882085ybd.33.1707949980020; Wed, 14 Feb 2024 14:33:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707949980; cv=pass; d=google.com; s=arc-20160816; b=MnWhcfp8CUEfEN+0RQIQ0se/9tz9pZBytzN24zNVitf1xxArutxtn2sW52+USWSacl PcI2VRkOhM7NLlEYIGB+DDCvrVSiBQeK+XulM3FNeywssXSDZdq5aktd8qTronaAAyl/ CsdsJ5vp1oKLJbjClaARqFq8OEeyg9lWaStrej99noVjzRtlkr7cYsNqLK5NuXA2NKHK tEPPPZjpdJZDENoYXAn8i9Plq0FrCn/wPAt67bDuylf8ER8hwd24Nx1AdR+Df0Fb3e7A tJZ+K7aE8fEuS8cXaVexkV8kgB6PXCKcGlELDVh2LMrWGqysS+t+EMEJKvSV3fHBQ1pj gASw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=eDxweK6fe3oib7W6T/1evsdFVVmS/oc6yGKmx5PFwhs=; fh=8Yi9ekhrsZFPoQwI1mqYNWqkTm1Q3iUHpkig+/9/fSE=; b=UP92cn6fqo8968X66rD3bXGlDSbqgFM0AxqhwnlXTQEVcJfd/ykgfuDF9NZoT3cnq9 YGDNKNKUnvluacY8gXjiLCMMMNHA6ABd6OeSOTpsDRIxbMNRwXRQbUc4R4D+19uT+d5X YnGhs9CaGdVUzMa0gRHVvhsQwsqbec/hAg2SgCAYbaWBAGdUPWIskreqJ6uSAZ86CZfL vPY8Qk4MQMBVI3DVNhiQqLLLjz3bBypCCZqoeZ/9Xg6j/Cr7hGXHz2QjR6DMpnc5y+uW CNTJ2Leoi6ua9rACV5DDCBGLY2yDvlD7WUHxK6k1aqrVJ1g49y8K3i2n0gxOAlPpjgf0 tspg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=d9fzbD43; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-66043-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66043-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c25-20020a05620a165900b007872d50caf6si86140qko.334.2024.02.14.14.32.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 14:33:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66043-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=d9fzbD43; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-66043-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66043-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CB2921C21E1B for ; Wed, 14 Feb 2024 22:32:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6C381420DD; Wed, 14 Feb 2024 22:32:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="d9fzbD43" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 694031DDD7; Wed, 14 Feb 2024 22:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707949930; cv=none; b=gDSCZ8qBkfu1nC2vegAwFZgsVPB5Y333YZPGF6/GTeXDhjaePZIfZ1rH36K8nZRgh0LE+lPhq+LzgmUks4ISY9zeV4/AT5MobntwxsW9JgOANbNraLVwzWv9o1pshwuZDkF2vGPKztJrJIjvXDRiOWTqxDvH27CQ8dDNlAY4178= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707949930; c=relaxed/simple; bh=ZAx0hbDQxNxPk3gnGrB2LfNm++Pl1HRQT6UpuMGGB8w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OpEsVfAH4zQ55u3ydKgZldRyXY1djsaGkffQg7NVRa2ifOx6y5KY52mO3za+bKjrZkqZtHSVaVIiblhEr5y2V228pGX0XPiJtRCCmNQjiw+g91LkmIvNP+faRYWhNvoes7N6uSMVTJA0P3SSIkLHz2KyzhOUZawOxQ5veTRGMXg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=d9fzbD43; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41ELiRZa022683; Wed, 14 Feb 2024 22:31:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=eDxweK6fe3oib7W6T/1evsdFVVmS/oc6yGKmx5PFwhs=; b=d9fzbD43R6Q5J4Et3YoOoBxkTq6KwLIyYUEK/KkNDnkAKazBGrbpmzB0WroOL8Yi4Rnk LiRlYhnlZS1SaQYJfJDSR8qNAtHnWJSOsb+6osV2oS8C/f0PmAtuNUZbGE8tTT/I7xhD 0rK2JuKZAxzhky6RgqN4EozvsLfLs23FP4OezCWdjZ23CgZQUU5QjDMnDHvw03okrN5B GYGtR8yEI8DuV+Lh8r/GaxpXE1Zy5LKH57sYIJYswpeE0Def0LDfHMXE9gk5wDQmoIc1 MvEQtEyTOZAfieXY1TNdPRu8zlnecP2xIZPAE/jmzuEB0T43Fm7W7DXh4SkHqWq8TIfl Kg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3w92ppghjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Feb 2024 22:31:35 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 41EL03gA000480; Wed, 14 Feb 2024 22:31:33 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3w5yk9n76t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 14 Feb 2024 22:31:33 +0000 Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41EMVTV0004281; Wed, 14 Feb 2024 22:31:33 GMT Received: from bur-virt-x6-2-100.us.oracle.com (bur-virt-x6-2-100.us.oracle.com [10.153.92.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3w5yk9n72r-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 14 Feb 2024 22:31:32 +0000 From: Ross Philipson To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org, linux-crypto@vger.kernel.org, kexec@lists.infradead.org, linux-efi@vger.kernel.org Cc: ross.philipson@oracle.com, dpsmith@apertussolutions.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, dave.hansen@linux.intel.com, ardb@kernel.org, mjg59@srcf.ucam.org, James.Bottomley@hansenpartnership.com, peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca, luto@amacapital.net, nivedita@alum.mit.edu, herbert@gondor.apana.org.au, davem@davemloft.net, kanth.ghatraju@oracle.com, trenchboot-devel@googlegroups.com Subject: [PATCH v8 03/15] x86: Secure Launch Kconfig Date: Wed, 14 Feb 2024 14:18:35 -0800 Message-Id: <20240214221847.2066632-4-ross.philipson@oracle.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240214221847.2066632-1-ross.philipson@oracle.com> References: <20240214221847.2066632-1-ross.philipson@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-14_14,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 mlxscore=0 bulkscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402140170 X-Proofpoint-ORIG-GUID: qEOAt4N6P_IfV-bRj579FavWBYHDulDu X-Proofpoint-GUID: qEOAt4N6P_IfV-bRj579FavWBYHDulDu X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790915358072321594 X-GMAIL-MSGID: 1790915358072321594 Initial bits to bring in Secure Launch functionality. Add Kconfig options for compiling in/out the Secure Launch code. Signed-off-by: Ross Philipson --- arch/x86/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5edec175b9bf..d96d75f6f1a9 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2071,6 +2071,18 @@ config EFI_RUNTIME_MAP See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map. +config SECURE_LAUNCH + bool "Secure Launch support" + default n + depends on X86_64 && X86_X2APIC + help + The Secure Launch feature allows a kernel to be loaded + directly through an Intel TXT measured launch. Intel TXT + establishes a Dynamic Root of Trust for Measurement (DRTM) + where the CPU measures the kernel image. This feature then + continues the measurement chain over kernel configuration + information and init images. + source "kernel/Kconfig.hz" config ARCH_SUPPORTS_KEXEC