Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7967346rwr; Wed, 10 May 2023 15:42:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ED2+0jYeNlrkV0juYHdmfcVVFMC7BxKdToFPlq0A9KRTiyIoTm1QH7OYSFPmM1egP34Xv X-Received: by 2002:a05:6a20:4c8:b0:ec:6039:f76f with SMTP id 8-20020a056a2004c800b000ec6039f76fmr18526897pzd.11.1683758570316; Wed, 10 May 2023 15:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683758570; cv=none; d=google.com; s=arc-20160816; b=JrvOciYOWHnGO9lXC4ha/ylGD245VsW06xgvxZdVZTlmCLbfBfvObAo9Z2K0ExcOxC e7aNI8jgn4OWjUHNTntFuDc1eAfOfpLQPXCpDllv6lcabjleXBCkE8vcg2+U7RUg6PKx xc4wK36w77KUeMJ52tPDk6Jgih0kPWKOZV7k4wswG8EJV8ABfOM1rrJ4BP2WWTf6WRQb 83ao340aEysPg8XRyzbj+jOBh0GEBf2bGz8isn9plzClN1XBUFRccIXQKukh01hKYqNx 7tEoIF8kajie88brO/m03Dbs+jacp9E9om7TDGdX/VG2CGpw+dVgTlmOtpWGmvPlpjmO FySw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:subject:cc:to:from :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=WrbljMS/WQ1cvK7jFvXS7lO9ot99WCLpg0oOroL4r8A=; b=l8p78O+GOmdauMM+xLZIfREdRWTLbUNgg6kwjdh/2EINkTuipe8/9wJnVdpecgv7bR 4XoEtRNfprrNKCI3cCsJwo3i6bXJBrAaEPpXDacyFMTdOBfSl13/sFHPLSyEU6K8kCmA PP63EecEkkFUHr191Q7IHvSWuQuJ9u6fhhGmQ0loIwbNrYV2PKaAMiPGivwtAHt2TA4w tjqDsfZqgeV5eTvUSgPEKghEURd+blIKnfORx3rAIf/3pCJU6XbKiedQ93wJ0/NWprhs /i2xmx3fk1cIb9ZwB0B096+Q4hjhM5RTdnjT4UKYacf7VIqVXpk0pLMO2T8Qrjyx7eEO IWZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Il5YzSjP; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o20-20020aa79794000000b006438c116ebcsi6011471pfp.384.2023.05.10.15.42.36; Wed, 10 May 2023 15:42:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@kernel.org header.s=k20201202 header.b=Il5YzSjP; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236184AbjEJWlB (ORCPT + 99 others); Wed, 10 May 2023 18:41:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjEJWlA (ORCPT ); Wed, 10 May 2023 18:41:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB509270D; Wed, 10 May 2023 15:40:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 826E66150C; Wed, 10 May 2023 22:40:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29320C433EF; Wed, 10 May 2023 22:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683758458; bh=tF9aA3aQ1D5AlFCI2Nv7HBfN5V1j5FLcOx2tAAEBbHM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Il5YzSjPIXLXdPaI5/sW6jzyUD7EokkmmqfKlVwieWUDC1E1E3AG1h3vprJUyD+5W dl8VUoMaNNvPGipJNCal3ogW7ZjV50bqESSfawYg5rTCCVwQANxBoaAEC3v4sqlOe/ uiv5xj3dWrewBJufJ4WthVEvVUqGyJ1CTqcbr8pqK0RHjZs+ndZU1HcCWV1C9ZMmpD oarS9fwjus+jKN5ZixWyJ+7QhSKd03ek6HlSEARjdUQJoADPiBxSyoB4fQ+kAfTjlM 2Ld3lLaaYiuW4ct4ZGMy8akKFz8dD/gWFs/a6zfW69YsqSylolwmzjkEfftYmsD5DH PPrU1k3h0+vBg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 11 May 2023 01:40:53 +0300 Message-Id: From: "Jarkko Sakkinen" To: "Ross Philipson" , , , , , , , , Cc: , , , , , , , , , , , Subject: Re: [PATCH v6 12/14] x86: Secure Launch late initcall platform module X-Mailer: aerc 0.14.0 References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-13-ross.philipson@oracle.com> In-Reply-To: <20230504145023.835096-13-ross.philipson@oracle.com> 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_PASS,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-crypto@vger.kernel.org On Thu May 4, 2023 at 5:50 PM EEST, Ross Philipson wrote: > From: "Daniel P. Smith" > > The Secure Launch platform module is a late init module. During the > init call, the TPM event log is read and measurements taken in the > early boot stub code are located. These measurements are extended > into the TPM PCRs using the mainline TPM kernel driver. > > The platform module also registers the securityfs nodes to allow > access to TXT register fields on Intel along with the fetching of > and writing events to the late launch TPM log. > > Signed-off-by: Daniel P. Smith > Signed-off-by: garnetgrimm > Signed-off-by: Ross Philipson > --- > arch/x86/kernel/Makefile | 1 + > arch/x86/kernel/slmodule.c | 520 +++++++++++++++++++++++++++++++++++++++= ++++++ > 2 files changed, 521 insertions(+) > create mode 100644 arch/x86/kernel/slmodule.c > > diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile > index 3d2a33e..ee3fe300 100644 > --- a/arch/x86/kernel/Makefile > +++ b/arch/x86/kernel/Makefile > @@ -73,6 +73,7 @@ obj-$(CONFIG_IA32_EMULATION) +=3D tls.o > obj-y +=3D step.o > obj-$(CONFIG_INTEL_TXT) +=3D tboot.o > obj-$(CONFIG_SECURE_LAUNCH) +=3D slaunch.o > +obj-$(CONFIG_SECURE_LAUNCH) +=3D slmodule.o > obj-$(CONFIG_ISA_DMA_API) +=3D i8237.o > obj-y +=3D stacktrace.o > obj-y +=3D cpu/ > diff --git a/arch/x86/kernel/slmodule.c b/arch/x86/kernel/slmodule.c > new file mode 100644 > index 0000000..70dcff5 > --- /dev/null > +++ b/arch/x86/kernel/slmodule.c > @@ -0,0 +1,520 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Secure Launch late validation/setup, securityfs exposure and > + * finalization support. /* Secure Launch late validation/setup, securityfs exposure and finalizatio= n */ 79 characters (max length allowed is 100). BR, Jarkko