Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp797696ybj; Tue, 5 May 2020 07:42:36 -0700 (PDT) X-Google-Smtp-Source: APiQypJzK5Bcdxjq68INyqV4X0tFoLY2NGd4opxd8y4HG5rQxAUdZLSAItt0DmkWg59Lscjv3eTT X-Received: by 2002:aa7:dacc:: with SMTP id x12mr3020726eds.363.1588689756487; Tue, 05 May 2020 07:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588689756; cv=none; d=google.com; s=arc-20160816; b=XXFYTLDFL6XtIKXW5LqO26LnbMsIzjBJeZyxZzQ8iynuzmz3rY802EhqrE9BDln0NF mZ5c54XElYUNVJVbOdL+z0KPJ+t8/0EvGh8+z4ncJ0RMNg7PRBiim35d3cGcKS82E3XL xI+iML30OPAvGsUSSFs2PVeKqDfPokM/mriA+lFtXaV5/9Cq2Wns/TyxwB9Ix8dKBSf1 zYW9w4cZi0y69/gQrhCgCzvp0oGTtX2c9C8WzBbjakTh5VwWEAigKkm1HSGyaoFBlCGw 1tpJydVAlDRKUxHsDAeRO1WZAJj02f0TTMdCdMx31a0JKYbRjnlJhREMlW1gXgV//2lC l+cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=mc1o0RrHIqf+oUSaZhW2tvP/Z4qxWuVxvaAL+08iRRM=; b=FhjI0GqZaDoO8o5wi6p3rLQQ0WVl/dldcytyCQbT5GcYhOPx2sdGJF36riYJtIV5Ar DVA5KLwstiLsvpcEbYKUMojS/84D0kr0Z/B8jQzzQLSxHeaq9B5QskeZwMwRAK2545iv s0xWEeE0JdoYjx/XyGN/snIq9jtGl2kdjxn9WUblyJMAth3Oy0zmh/TfNi+3e+2cmEe4 MBzNGWWt1VNoTmuidrD7csto6OPjv4bhW4oBVXx12Z77M4mgxOmnASCD/bWrORPxMr9P ZKntsv6A3XbfLbCEiyrUc1iMKBpDCubaEjYHynaoQjMtAo/GUj7zqDZIqQAa6SdhYH2i SHog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oh23si1249216ejb.22.2020.05.05.07.42.12; Tue, 05 May 2020 07:42:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729259AbgEEOiL (ORCPT + 99 others); Tue, 5 May 2020 10:38:11 -0400 Received: from mga09.intel.com ([134.134.136.24]:10448 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729142AbgEEOiK (ORCPT ); Tue, 5 May 2020 10:38:10 -0400 IronPort-SDR: LJIv8flpL0DOywwYbtQu5Hl8LrWdqdaH6V2Dqx7GplVt/wXlIzbf9ciy7uAtbQqyzVWBVVfBTK b9kdr44se+dw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 07:38:10 -0700 IronPort-SDR: FWtAd1kDyXb7Jwvx402XLN432nPl1pZL/T1Abu+ZisNKd8aDkusbQdrCa19Ey81VCSABByadA/ uJBokpct78oQ== X-IronPort-AV: E=Sophos;i="5.73,355,1583222400"; d="scan'208";a="434507883" Received: from lhawrylk-desk.ger.corp.intel.com ([10.213.12.77]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 07:38:05 -0700 Message-ID: <2dad6366d2fceb0a9e36f284a8ed5a8ed86d8756.camel@linux.intel.com> Subject: Re: [GRUB PATCH RFC 00/18] i386: Intel TXT secure launcher From: Lukasz Hawrylko To: Daniel Kiper , grub-devel@gnu.org, linux-kernel@vger.kernel.org, trenchboot-devel@googlegroups.com, x86@kernel.org Cc: alexander.burmashev@oracle.com, andrew.cooper3@citrix.com, ard.biesheuvel@linaro.org, dpsmith@apertussolutions.com, eric.snowberg@oracle.com, javierm@redhat.com, kanth.ghatraju@oracle.com, konrad.wilk@oracle.com, krystian.hebel@3mdeb.com, michal.zygowski@3mdeb.com, mjg59@google.com, phcoder@gmail.com, pirot.krol@3mdeb.com, pjones@redhat.com, ross.philipson@oracle.com Date: Tue, 05 May 2020 16:38:02 +0200 In-Reply-To: <20200504232132.23570-1-daniel.kiper@oracle.com> References: <20200504232132.23570-1-daniel.kiper@oracle.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-05-05 at 01:21 +0200, Daniel Kiper wrote: > Hi, > > This is an RFC patchset for the GRUB introducing the Intel TXT secure launcher. > This is a part of larger work known as the TrenchBoot. Patchset can be split > into two distinct parts: > - 01-12: preparatory patches, > - 13-18: the Intel TXT secure launcher itself. > > The initial implementation of the Intel TXT secure launcher works. However, > there are still some missing bits and pieces, e.g.: > - SINIT ACM auto loader, > - lack of RMRR support, > - lack of support for MLEs larger than 1 GiB, > - lack of TPM 1.2 support. > - various fixes and cleanups. > > Commands introduced by this patchset: tpm_type, slaunch, slaunch_module (not > required on server platforms) and slaunch_state (useful for checking platform > configuration and state; based on tboot's txt-stat). > > Daniel > Hi Daniel Your patch looks promising, however I have few concerns. In OS-MLE table there is a buffer for TPM event log, however I see that you are not using it, but instead allocate space somewhere in the memory. I am just wondering if, from security perspective, it will be better to use memory from TXT heap for event log, like we do in TBOOT. There is a function that verifies if platform is TXT capable -grub_txt_verify_platform(), it only checks SMX and GETSEC features. Although BIOS should enforce both VMX and VT-d enabled when enabling TXT, I think that adding these check here as redundancy may be a good idea. The same situation is with TPM presence. I suggest to add possibility to skip TXT launch when last boot ended with TXT error. This option can avoid boot loops when something goes wrong. How will you read LCP from storage? I see that there is slaunch_module command that currently you are using only for loading SINIT. In the future it can be expanded to support LCP file too, what do you think? Do not forget to apply changes required by latest Intel's platforms, you should check following commits in TBOOT's repository: 2f03b57ffdba, fe2dddd742dc. Lukasz