Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2946987rwd; Fri, 16 Jun 2023 10:08:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6buh7tcrNCCP0MxZhl61ABTkIR4lm/b2UdEKM6SwKa9bDWJ2juUBInkHJSDJ+3qC+J6Edu X-Received: by 2002:a05:6870:9a1c:b0:192:75b9:5bf7 with SMTP id fo28-20020a0568709a1c00b0019275b95bf7mr3160338oab.2.1686935299583; Fri, 16 Jun 2023 10:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686935299; cv=none; d=google.com; s=arc-20160816; b=NFw4+8qYDcTPTl3Z4ygWl9pHOWRWOTQeExRbcpWiNAQaoS4zF0TfE82oL7Dhc58gCp 1jK6G99Q4C4oOKBY/+Imofr6dxFB/XZpJO4ug/JyX5X02HIyIW3PCeXS0RBPLgxJfcQp vmrTn1rW6+UDdgs8wZtwS/DxFzfHVaKv4/7zHh98W1HUtWUk8hE0mpbjcWbExy0FctgU hSjLxnIPKr6gDyI+5fwZ8T8DQPYQqugrhj9FM3lmwi9VGPx6hjHnXaAvNPvB6PgftU1o F98D2Hcg6alJwkdrJMyPXI55RFUpB2JNNgqx0AgP787psSYT+0kGcj3ipIgyuHzO7SFp 2oZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ZLziyCtx2OaVlVNpG4zfCSJyn4hmhm9avXOMUq5AYfs=; b=Ve49jKBrW0d1zucPKK/1tmvci9jbpdmeI4gqNxdP1xbOthrZqwkqRUy3sNZ/iB5Qn4 XC2Ckx4DTm1GJIEGDAmCPjhH9gjdEvJQl2eWuXMNnZH0w7fjgKggtfyUmDo46ucnnoUD siG83NiZNdHu9wHcW+3Za4+uKhYE4thSqQ5dgcNV3xhs0KffqHGjNltFfjnLED9Gtksy zYCL+mQ0yOzzxW/+/p6GclCUbf3B/9iXQeZbjvsEYZ22Sjl3XsMmddz4J9Z55tkU3Bd3 J87R+1iglOSHey6F6bkDDpV1SPapiK/Ne8BQVJlgJk6aQ5wQV366bGLHF5aUJ4Nv7xbi nNAA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a63b744000000b00534780446d9si11738576pgt.640.2023.06.16.10.07.45; Fri, 16 Jun 2023 10:08:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346020AbjFPQ4R (ORCPT + 99 others); Fri, 16 Jun 2023 12:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345736AbjFPQ4D (ORCPT ); Fri, 16 Jun 2023 12:56:03 -0400 Received: from cavan.codon.org.uk (cavan.codon.org.uk [176.126.240.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D573590; Fri, 16 Jun 2023 09:54:25 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 5E29440A72; Fri, 16 Jun 2023 17:54:15 +0100 (BST) Date: Fri, 16 Jun 2023 17:54:15 +0100 From: Matthew Garrett To: "Daniel P. Smith" Cc: Ross Philipson , linux-kernel@vger.kernel.org, x86@kernel.org, linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, kexec@lists.infradead.org, linux-efi@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, ardb@kernel.org, James.Bottomley@hansenpartnership.com, luto@amacapital.net, nivedita@alum.mit.edu, kanth.ghatraju@oracle.com, trenchboot-devel@googlegroups.com Subject: Re: [PATCH v6 02/14] Documentation/x86: Secure Launch kernel documentation Message-ID: <20230616165415.GA28537@srcf.ucam.org> References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-3-ross.philipson@oracle.com> <20230512104753.GA14461@srcf.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, Jun 16, 2023 at 12:44:27PM -0400, Daniel P. Smith wrote: > > On 5/12/23 06:47, Matthew Garrett wrote: > > On Thu, May 04, 2023 at 02:50:11PM +0000, Ross Philipson wrote: > > > +Secure Launch does not interoperate with KASLR. If possible, the MLE should be > > > +built with KASLR disabled:: > > > > Why does Secure Launch not interoperate with KASLR? > > > > Re: IOMMUs > > Until the IOMMU driver comes online, memory is protected by the PMRs regions > requested by the Preamble (pre-launch code) in accordance with Intel TXT > specifications and configured by the ACM. The KASLR randomizer will run > before the IOMMU driver is able to come online and ensure frames used by the > kernel are protected as well as frames that a driver may registered in a BAR > are not blocked. This seems unfortunate. Presumably we're not able to modify the PMRs at this point? This also seems like a potential issue for IOMMU config in general - the presumption is that the firmware should be configuring the IOMMU in such a way that DMA-capable devices can't attack the firmware while we're in the boot environment, and if KASLR is leaving a window there then it seems like we'd need to fix that? > > > +It is recommended that no other command line options should be set to override > > > +the defaults above. > > > > What happens if they are? Does doing so change the security posture of > > the system? If so, will the measurements be different in a way that > > demonstrates the system is in an insecure state? > > > > In an early version of the patch series this was enforced when turning on > Secure Launch, but concerns were raised over this approach and was asked to > allow the user to be able to shoot themselves in the foot. Overriding these > values could render either an insecure state and/or an unstable system. If we're in an insecure state, is that something that would show up in the form of different measurements?