From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77BABC25B07 for ; Tue, 9 Aug 2022 08:47:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241057AbiHIIrW (ORCPT ); Tue, 9 Aug 2022 04:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240163AbiHIIrO (ORCPT ); Tue, 9 Aug 2022 04:47:14 -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 60F49A190 for ; Tue, 9 Aug 2022 01:47:09 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 721604155D; Tue, 9 Aug 2022 09:47:07 +0100 (BST) Date: Tue, 9 Aug 2022 09:47:07 +0100 From: Matthew Garrett To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, "James E.J. Bottomley" , Peter Jones , Ilias Apalodimas , Heinrich Schuchardt , AKASHI Takahiro , Palmer Dabbelt , Atish Patra , Arnd Bergmann , Huacai Chen , Lennart Poettering Subject: Re: [PATCH v2 0/6] efi: implement generic compressed boot support Message-ID: <20220809084707.GA3357@srcf.ucam.org> References: <20220809080944.1119654-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220809080944.1119654-1-ardb@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Tue, Aug 09, 2022 at 10:09:38AM +0200, Ard Biesheuvel wrote: > The only slight downside is that when UEFI secure boot is enabled, the > generic LoadImage/StartImage only allow signed images to be loaded and > started, and we prefer to avoid the need to sign both the inner and > outer PE/COFF images. This series adopts the EFI shim approach, i.e., to > override an internal UEFI/PI protocol that is used by the image loader, > to allow the inner image to be booted after decompression. This has been > tested to work with Tianocore based EFI implementations on arm64, but > u-boot will need some interoperability tweaks as well, ideally just a > protocol that exposes a LoadImage/StartImage combo that the decompresor > can use directly to circumvent the signature check. (Note that EFI apps > have full control over the CPU, page tables, etc. so having code that > circumvents authentication checks is not as crazy as it sounds, given > that the app can do anything it pleases already.) I think it's worth mentioning that Shim doesn't do this by default because it's not guaranteed that something implementing the UEFI DXE layer also implements the PI layer. I don't have an objection to it being an expectation on any Linux-supporting platform that the implementation works this way, but it should maybe be made clear that this could unexpectedly fail on generic platforms.