Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2824457lqz; Wed, 3 Apr 2024 09:32:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGTx4jEMgqQp4i4HW7yllzI5odJyEi6iOejSoaiLIJtrF40NmlYhoArEJQ32tjxe63pb+OJF50dMCEFgAn1Huk+Z2M/USLZL4wDcsU5Q== X-Google-Smtp-Source: AGHT+IH4KFciPCiT6RAY7lslCGC5uPxuHqeKt4jYyoSuFTbo2zvTRp08bU9nHU2UPtQDz3uJcsuj X-Received: by 2002:a05:6a00:4b56:b0:6ea:c5cc:f4d with SMTP id kr22-20020a056a004b5600b006eac5cc0f4dmr38436pfb.11.1712161955976; Wed, 03 Apr 2024 09:32:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712161955; cv=pass; d=google.com; s=arc-20160816; b=BkTxarijlYIDbKteMELOlWrFTIuCPEFMqnsxgAKBuuW7fmCRMU13U2Y4ODish9eGUS EhAb66j7oHJLMlxVeYOt6yIik9dd8J0JEZTKiy01U1jJ6NbaslFD/L1HyG7+wX+gAotx l2m5WslT2u+uc8O7/9dUD9jowG6W7fMFkoKA4C6Y9AY93PHwGdy7odw02lqXAyZIFbgQ 4ZCALF0xvcQHKTjS5JKLH1b/PzoWRU0+nXOubUjvqalpoQ1uPIt0Qot5r3AUbMl2jQ4d zJ9olgtjhKQytbmKjxbKsxvYs1A9s3YLun6SA24J5om0ynraLOlMVnYLzbsdW7QBv3Cj sMuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature; bh=Kfaa4a7v1+NNehR+TTf0eGR94+GxKalsrf3RM7ccs70=; fh=pWd3vSVQV5zUCTPSNOTW00FL1VGzJknyMhBm8MZjRWQ=; b=DTlx90iMY7sIm+Eaj1gD8Hf79/zCGCqM0vHf/8+RilStkvDnlnHpU6Si+sDPkUYanE 61toDt3UZWKqQwBjm8yJwnC9IQtAOicg7ldvv7a+kowzySfSUEbhvuNEjWtSB59PtEPH ujfrQpxVNOKO4J1BqJGy0va7/2ltUinCRwZTcIqK9c0N9QEkFeaoLwf5dFf8XUGBsVz0 PVhZkrWQRXkuTrZrKbFa8NFBid4PUj2oraZytckzzpuuLem78GeDOYnT35+BmmM/3orS BybplRJF43eDZTiGW2a4vGVgIwF3yY71icUF48TqDPm1DlmTlh8YCwb2eO3xxoFto3PQ Fheg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QW0wEMDg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id fj27-20020a056a003a1b00b006ea93a78e80si13917628pfb.128.2024.04.03.09.32.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 09:32:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QW0wEMDg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CEA6288638 for ; Wed, 3 Apr 2024 16:32:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EDAF18E20; Wed, 3 Apr 2024 16:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QW0wEMDg" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9673B147C79; Wed, 3 Apr 2024 16:32:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712161947; cv=none; b=uqiCzyp7uWZFwIiRZrfcqtOkAkzhDoCG+n3w/JpzZVdSCuYnwwB3XNqAC9YmnhiZWu5b/qiC0FKT2um+mTAM4Zi1Y5YjFpJGfE2zF+LA6wLkO5Er93iZEbG7Xg9KqQh9tVa/10R+esUOQZ5boLKQ9RychDDVxjEgqw0UOQzzSdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712161947; c=relaxed/simple; bh=0XnUl7dj6Ea6m99gt6Fm1hxbMTZDNcxsfZFaaTdkK5c=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=bgsIb4RWa875sCyUeyQYSPziT6n/qlhAMpBP4NQchd8AcKuk4/9gGZzCIEs6XVfYwNChl4DJ7uM0iB96JdbZLr63vSokKfEQaiWYY0J4x/boqDd9OTBr87Im7+6MRKzhM+kK0Ya3khmMeTcHw9esdWLW4kCd6/vCqKFO5pY3JWk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QW0wEMDg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2C6DC43390; Wed, 3 Apr 2024 16:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712161947; bh=0XnUl7dj6Ea6m99gt6Fm1hxbMTZDNcxsfZFaaTdkK5c=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=QW0wEMDgMWUZ79xdJoYkLiIHXuRzTAb74DDl4+KTGBNms5tjbS3/Dq+NcDc/zM9pO 6ZMVHRwU4f/KsH8hhp8YWGgsPfB2hJNE/zW10M9fNJGwioTTI5RXj9LCK+4kHdpVm7 56pe0foBhqSV/IedS0ZRo0OM98CPRLAZ0exUkyl4t19cXWE+Na+N4g157rMIWwR/+a Jcd3P4AfBQbMfSwsNHWa4ynpqUPezzrEo0T5J8uagcJ/oCtRjq5w5FwG4qL0dwkbtX JqxgjIMslOOZNAxqEP/MmDLPJKxFjR8PAcnLi14nzPRradUx/1PaspPsqJ02egM7eE u7cRF7RLttn6g== Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfauth.nyi.internal (Postfix) with ESMTP id F06881200066; Wed, 3 Apr 2024 12:32:24 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute3.internal (MEProxy); Wed, 03 Apr 2024 12:32:25 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefiedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet nhguhicunfhuthhomhhirhhskhhifdcuoehluhhtoheskhgvrhhnvghlrdhorhhgqeenuc ggtffrrghtthgvrhhnpeduveffvdegvdefhfegjeejlefgtdffueekudfgkeduvdetvddu ieeluefgjeeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrnhguhidomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduiedu keehieefvddqvdeifeduieeitdekqdhluhhtoheppehkvghrnhgvlhdrohhrgheslhhinh hugidrlhhuthhordhush X-ME-Proxy: Feedback-ID: ieff94742:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0360131A0064; Wed, 3 Apr 2024 12:32:22 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-333-gbfea15422e-fm-20240327.001-gbfea1542 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <10db421c-77da-4a1c-a25e-2374a7a2ef79@app.fastmail.com> In-Reply-To: <20240223183004.GE1112@sol.localdomain> References: <20240214221847.2066632-1-ross.philipson@oracle.com> <20240214221847.2066632-7-ross.philipson@oracle.com> <98ad92bb-ef17-4c15-88ba-252db2a2e738@citrix.com> <1a8e69a7-89eb-4d36-94d6-0da662d8b72f@citrix.com> <431a0b3a-47e5-4e61-a7fc-31cdf56f4e4c@citrix.com> <20240223175449.GA1112@sol.localdomain> <20240223183004.GE1112@sol.localdomain> Date: Wed, 03 Apr 2024 09:32:02 -0700 From: "Andy Lutomirski" To: "Eric Biggers" , "Andrew Cooper" Cc: "Ard Biesheuvel" , "Ross Philipson" , "Linux Kernel Mailing List" , "the arch/x86 maintainers" , linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org, "Linux Crypto Mailing List" , kexec@lists.infradead.org, linux-efi@vger.kernel.org, dpsmith@apertussolutions.com, "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "H. Peter Anvin" , "Dave Hansen" , "Matthew Garrett" , James.Bottomley@hansenpartnership.com, peterhuewe@gmx.de, jarkko@kernel.org, "Jason Gunthorpe" , "luto@amacapital.net" , "Arvind Sankar" , "Herbert Xu" , davem@davemloft.net, kanth.ghatraju@oracle.com, trenchboot-devel@googlegroups.com Subject: Re: [PATCH v8 06/15] x86: Add early SHA support for Secure Launch early measurements Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Feb 23, 2024, at 10:30 AM, Eric Biggers wrote: > On Fri, Feb 23, 2024 at 06:20:27PM +0000, Andrew Cooper wrote: >> On 23/02/2024 5:54 pm, Eric Biggers wrote: >> > On Fri, Feb 23, 2024 at 04:42:11PM +0000, Andrew Cooper wrote: >> >> Yes, and I agree.=C2=A0 We're not looking to try and force this in= with >> >> underhand tactics. >> >> >> >> But a blind "nack to any SHA-1" is similarly damaging in the oppos= ite >> >> direction. >> >> >> > Well, reviewers have said they'd prefer that SHA-1 not be included = and given >> > some thoughtful reasons for that. But also they've given suggestio= ns on how to >> > make the SHA-1 support more palatable, such as splitting it into a = separate >> > patch and giving it a proper justification. >> > >> > All suggestions have been ignored. >>=20 >> The public record demonstrates otherwise. >>=20 >> But are you saying that you'd be happy if the commit message read >> something more like: >>=20 >> ---8<--- >> For better or worse, Secure Launch needs SHA-1 and SHA-256. >>=20 >> The choice of hashes used lie with the platform firmware, not with >> software, and is often outside of the users control. >>=20 >> Even if we'd prefer to use SHA-256-only, if firmware elected to start= us >> with the SHA-1 and SHA-256 backs active, we still need SHA-1 to parse >> the TPM event log thus far, and deliberately cap the SHA-1 PCRs in or= der >> to safely use SHA-256 for everything else. >> --- > > Please take some time to read through the comments that reviewers have= left on > previous versions of the patchset. So I went and read through the old comments, and I'm lost. In brief sum= mary: If the hardware+firmware only supports SHA-1, then some reviewers would = prefer Linux not to support DRTM. I personally think this is a bit sill= y, but it's not entirely unreasonable. Maybe it should be a config opti= on? If the hardware+firmware does support SHA-256, then it sounds (to me, re= ading this -- I haven't dug into the right spec pages) that, for optimal= security, something still needs to effectively turn SHA-1 *off* at runt= ime by capping the event log properly. And that requires computing a SH= A-1 hash. And, to be clear, (a) this is only on systems that already su= pport SHA-256 and that we should support and (b) *not* doing so leaves u= s potentially more vulnerable to SHA-1 attacks than doing so. And no SH= A-256-supporting tooling will actually be compromised by a SHA-1 comprom= ise if we cap the event log. So is there a way forward? Just saying "read through the comments" seem= s like a dead end. Thanks, Andy