Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32367305rwd; Fri, 7 Jul 2023 12:42:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlFf8CgQQJgWN1Oqy6rsGX7j0TcNJw0hXAl5+KkvM0ymq+/VoPW4f8MWiTYWpzbB3L2eR2ei X-Received: by 2002:a05:6a20:3cab:b0:121:84ce:c629 with SMTP id b43-20020a056a203cab00b0012184cec629mr6869710pzj.0.1688758974441; Fri, 07 Jul 2023 12:42:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688758974; cv=pass; d=google.com; s=arc-20160816; b=y7WhorrB6HIEAjOehKeV7erjuFc43h/gSAGeHbFzp8Zr6iZv0Z3k4oJgob5//Cnpv5 evtio4QzG8C/BtsyJDD1UGjxv6Wjh4PtzDebxMbD6/lhWQCiaIBa0P8P8tI2sXXAeaCa xnRZvvV6CPVtQ/KltqD5Er+eIMhod7yZ0OybfU3E+bjceM06Z1CeswZGfzWax1a+cdEy MOdk19yppRx5X6azVDFLB1JoZziY8EL9agKk0eUV9Qh4BUD8B2P3B8GNVJr/ZKibx8AC 7jhaCypQCkJ7ZzXEd55d44bh5nqgQYoOOfYpgemQ9kWA9vX94Zz5OHJ4iXyaNup1as9b 1zZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=fHoswupnpLAD4heKyuTd/2GZhFPZ+XaZr9DP5UrvceM=; fh=LHx+aw07EgMKsWB5yAWdCKoCCKro3owaveyxp9ZvEBg=; b=MB9r0S0mBIA0BJFGPt6uv5gd78Ye4TcsQBzv+sGei11U47nWH+NmhPo2+MTgfd89cU 4naxTKBjAgHzDyk8rHlExAJfU1ynuZx+tiiDbt0rdi/FIFxMez2aU+V2Xq684nQhNgp5 zbD9CGI9/TOaPo9LH6zYcJ7bky9WnQfK86+S0793D0gHvR6C5u9mGiyo6zL/hcB7VLGt pBDMMXg8lJ5lbLRxAQ/Knf6YqO+PN5yknjsQHafuC08GPm8A/1PQjDrQqzBdXwUroVk0 lBbTOiVQHblngutIf1Z2/Y+6NCZofC7w982baLq9ydbIXZLWObE3I/u5c3WPbGaOOGR1 BdBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@apertussolutions.com header.s=zoho header.b=HoM7R2M4; arc=pass (i=1 spf=pass spfdomain=apertussolutions.com dkim=pass dkdomain=apertussolutions.com dmarc=pass fromdomain=apertussolutions.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 35-20020a631763000000b005455d1ad59esi4364356pgx.314.2023.07.07.12.42.34; Fri, 07 Jul 2023 12:42:54 -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=@apertussolutions.com header.s=zoho header.b=HoM7R2M4; arc=pass (i=1 spf=pass spfdomain=apertussolutions.com dkim=pass dkdomain=apertussolutions.com dmarc=pass fromdomain=apertussolutions.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 S231565AbjGGTi5 (ORCPT + 99 others); Fri, 7 Jul 2023 15:38:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232808AbjGGTgB (ORCPT ); Fri, 7 Jul 2023 15:36:01 -0400 Received: from sender4-of-o50.zoho.com (sender4-of-o50.zoho.com [136.143.188.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9060E269F; Fri, 7 Jul 2023 12:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688758303; cv=none; d=zohomail.com; s=zohoarc; b=EwVRDfNxcmQnOtFGleOVrjIkgKRwh7y52cIfKN0GFaKN0OBxQFBpkW0gztPv2rTPKlsHRlXNwqX0V7X/g+5tbnDalixwm2P/depB+msJkqw/5QsMvebiIudbxXZcK1IbibAsD9T0IWr/xFfu3sBT8tHUKltieu6YOTNc2Jmrb0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688758303; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=fHoswupnpLAD4heKyuTd/2GZhFPZ+XaZr9DP5UrvceM=; b=DqSq9DCKsV8NNFqKvMsP7CH363mjfejdsBrrzQySj2V3OvRaWyj+oqjlPq7Epav31II3NSHM/7frG+F6Y1XfRgBLU0KRRwB9dW4hauAHB+OjLS5TlBRetCewMpONDWbHiwkl967kv0nYSIzxfV2EGWvZw+ADN9A1drGyDR7Yv1E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1688758303; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=Message-ID:Date:Date:MIME-Version:To:To:Cc:Cc:References:From:From:Subject:Subject:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=fHoswupnpLAD4heKyuTd/2GZhFPZ+XaZr9DP5UrvceM=; b=HoM7R2M40mW1tdXIy+g2mlEdzq4NQsxSZwuCWYH0mXFXkpb8z1J7gKkVr6gGnG0W ThRDcJKAEMQPpH/O0wwTDLv9oL/6evwho0H4lNX1iHqyRIe2OeOj97Jr0LvSCMlnL99 foaIXq91NT2RQ/qveQIN7YXB140UETdVegWIRZHg= Received: from [10.10.1.138] (static-72-81-132-2.bltmmd.fios.verizon.net [72.81.132.2]) by mx.zohomail.com with SMTPS id 1688758300880456.56534128910005; Fri, 7 Jul 2023 12:31:40 -0700 (PDT) Message-ID: Date: Fri, 7 Jul 2023 15:31:38 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Matthew Garrett 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 References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-5-ross.philipson@oracle.com> <20230512105554.GB14461@srcf.ucam.org> <30d5891d-4747-8d67-2667-ff07628740bd@apertussolutions.com> <20230515212206.GA2162@srcf.ucam.org> <20230516014310.GA5403@srcf.ucam.org> <20230616201513.GA30963@srcf.ucam.org> From: "Daniel P. Smith" Subject: Re: [PATCH v6 04/14] x86: Secure Launch Resource Table header file In-Reply-To: <20230616201513.GA30963@srcf.ucam.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 6/16/23 16:15, Matthew Garrett wrote: > On Fri, Jun 16, 2023 at 04:01:09PM -0400, Daniel P. Smith wrote: >> On 5/15/23 21:43, Matthew Garrett wrote: >>> On Mon, May 15, 2023 at 08:41:00PM -0400, Daniel P. Smith wrote: >>>> On 5/15/23 17:22, Matthew Garrett wrote: >>>>> What if I don't use grub, but use something that behaves equivalently? >>>>> Which value should be used here? >>>> >>>> Generally we would request that the bootloader submit a request to register >>>> for a value to be reserved in the spec. That aside, the intent here is to >>>> allow for the possibility for the DLE handler to be independent from the >>>> bootloader, but this does not have to be this way. If a non-open entity >>>> decides to produce their own implementation, they can freely use a >>>> unallocated value at their own risk that it could be allocated to another >>>> bootloader in the future. Though in this scenario it likely would not matter >>>> as the non-open DLE handler would only be present when the non-open >>>> bootloader was present. >>> >>> Is the expectation that the DLE will always be shipped with the >>> bootloader? I think I'm not entirely clear on what's consuming this and >>> why. >>> >> >> No, in fact, an early idea proposed by a pair of us in the TrenchBoot >> community was to have it live either as a Runtime Service that was loaded by >> a UEFI app or in the coreboot UEFI payload. > > Ok, then I think I'm still confused. If I want to write a new bootloader > but make use of the existing DLE, what contract am I establishing and > what value should I be putting in here? Apologies on the delayed response, vacation and what not. I believe I know where the confusion is coming from, let me see if I can explain better by why that field came about. The motivation for the SLRT came out of our agreement to use a callback mechanism to support entering efi-stub and then going back to a dynamic launch aware hook to complete the initiation of the dynamic launch. The SLRT was devised as a platform and kernel agnostic means to handle the launch. As such, there was a desire to use that interface, and the underlying DLE code, whether GRUB was launching the kernel via the UEFI interface or the traditional interface. Skipping the details, but it boils down to the fact that in the non-UEFI case, functionality from core GRUB was needed. As a result, to provide maximum flexibility for other bootloaders, and to make it easier on us, we add the ability to pass a context object across the interface. Thus allowing GRUB's DLE handler to have a single entry that could be called externally by efi-stub or directly from GRUB proper. IOW, the bootloader context is a means to provide a bootloader with them means to implement a private interface between the bootloader proper and a DLE handler that it installed into memory should its implementation require it. There is an underlying question within your question, and that is of reuse. In this case, we wrote GRUB's DLE handler was written specifically to be used by GRUB. It was written to provide a stable and demonstrable implementation of the SL interface. In the future it may get refactored or a common standalone implementation, e.g., the previously mentioned UEFI runtime service, may arise that would be reusable by multiple bootloaders. I hope this helped explain the purpose and use of this area of the table. Please let me know if it did not. V/r, DPS