Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp19826pxb; Wed, 30 Mar 2022 21:41:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBVxwMkKGSXVaKcry5iHQGY4Hfz7DSr/Tb6GGIFMXmiKtwPO3BGZVoQw9v9GblUSP2wzFg X-Received: by 2002:a05:6a00:729:b0:4f7:77ed:c256 with SMTP id 9-20020a056a00072900b004f777edc256mr3323283pfm.1.1648701684295; Wed, 30 Mar 2022 21:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648701684; cv=none; d=google.com; s=arc-20160816; b=LZ8OHqGyxqEbtsEzrmAdOYTsff5BbPaNZpJnTQK1408onvm0LDX3Xaxx9y2KKxZnG9 gRUwanpfobKKmX1EmqFNSaZcESzQAqCBLmZkvfMYg+Yxom35yAMjP/BVA0/eesiw0UgA z/12dyHawxFffPeGQeKlXPmvFyGzU2+jWPhHxqPmBBM+vCM8b8ycxyoLdwHfNS5yH6sp uUG1pWHLnVFd//A3L5KnX6XLkbgYgL7VMiBumWw4pN5Oe2Pcxj+cuw2WnsH0DZbS49fx Zxy3omSjw+BmxJGvGSue3FmP++vOPZBGhUYYiAb3X0nti2+vxIadshudSuVQUn7dOTSf yXvA== 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=7+D1IFwO9IWQkAWqagGlpuNcFbg3/MAXWe8K5UKRoyE=; b=M/8YvjsQKYagyIQQKmriNiPnCbKgyNfdsv67J8HPX6E2/7CdK6nax6ljtAsWYwpYz7 EW+F6fPoqBQvDVgaet45HoB6qSFKeo4NCOJBgIllj2LFpsJYzEvBfN6mHNkc2j91DaEd 0KOGyN1MSL6bS5rT020ArPd5BWt9GJMhvONGMNj7LFGrzSCN/i3Pdv88qCjRWXVIvbgq 0RUzHmdyiA+jK+3d6o9RNbeEeJ1+/Rn9GEfqar3OGPdcj37wnXRaC+QqpAxOlKl6CQ9e p553uBrwzWeO6UHQTVuxRImgsioeaV3UJisZ4TI9CsQ6KlyxNQTqgZsQjIR4KxSTQJGl RUVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u23-20020a632357000000b003821dcd9eb3si3894492pgm.819.2022.03.30.21.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:41:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AA9A92359F1; Wed, 30 Mar 2022 20:35:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243814AbiC3H3w (ORCPT + 99 others); Wed, 30 Mar 2022 03:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243820AbiC3H3u (ORCPT ); Wed, 30 Mar 2022 03:29:50 -0400 Received: from cavan.codon.org.uk (irc.codon.org.uk [IPv6:2a00:1098:84:22e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D601C5526; Wed, 30 Mar 2022 00:27:56 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 4449D40A71; Wed, 30 Mar 2022 08:27:55 +0100 (BST) Date: Wed, 30 Mar 2022 08:27:55 +0100 From: Matthew Garrett To: Ard Biesheuvel Cc: Daniel Kiper , Alec Brown , Kanth Ghatraju , Ross Philipson , "dpsmith@apertussolutions.com" , "piotr.krol@3mdeb.com" , "krystian.hebel@3mdeb.com" , "persaur@gmail.com" , "Yoder, Stuart" , Andrew Cooper , "michal.zygowski@3mdeb.com" , James Bottomley , "lukasz@hawrylko.pl" , linux-efi , Linux Kernel Mailing List , The development of GNU GRUB , Kees Cook Subject: Re: Linux DRTM on UEFI platforms Message-ID: <20220330072755.GA1169@srcf.ucam.org> References: <20220329174057.GA17778@srcf.ucam.org> <20220330071103.GA809@srcf.ucam.org> <20220330071859.GA992@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.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,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-kernel@vger.kernel.org On Wed, Mar 30, 2022 at 09:23:17AM +0200, Ard Biesheuvel wrote: > On Wed, 30 Mar 2022 at 09:19, Matthew Garrett wrote: > > From a conceptual perspective we've thought of the EFI stub as being > > logically part of the bootloader rather than the early kernel, and the > > bootloader is a point where the line is drawn. My guy feeling is that > > jumping into the secure kernel environment before EBS has been called is > > likely to end badly. > > If you jump back into the system firmware, sure. > > But the point I was trying to make is that you can replace that with > your own minimal implementation of EFI that just exposes a memory map > and some protocols and nothing else, and then the secure launch kernel > would be entirely in charge of the execution environment. We can't just replace system firmware with an imitation of the same - for instance, configuring the cold boot prevention memory overwrite requires us to pass a variable through to the real firmware, and that's something that we do in the stub.