Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp804684rwo; Wed, 2 Aug 2023 04:38:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlFSn7twDK+AtkwBawRBpKBPxJPkWDnNSoivN2yOOw3N0FmERlkVSFS1RCuno4jr8lkBZ4j2 X-Received: by 2002:a17:906:64ce:b0:99b:484b:21b4 with SMTP id p14-20020a17090664ce00b0099b484b21b4mr7022884ejn.8.1690976295071; Wed, 02 Aug 2023 04:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690976295; cv=none; d=google.com; s=arc-20160816; b=KbdRH/SADx85ezXZQXWDH11UFxIvl47P7++XRxq1SYhgqdLS7VELfBZOBRKdrv1c/m bP0BaActEpKDb9o1hBIpxPxmP9GPVsYzTHS+hNwtEwx5MT4FwX4FkzM8S5KGQW6qF6Hj CHE/HVEX6yPqdurbSuKS+/C7qHaGfi1yQxG05yikAMIhMS6vZZklkZ6WrGWvz0L8ixop +W2Ciwmve8Bulw2V+pwH37Wimc7FQB2hvGS86oe03NRa93DFPO4J4Say88MUE9N6mltb oj5P2cRI2qOM8eKGdY9BIklowV/VPc+fjnXXevYZB+gm6UifSRfbxNrvz6Tg1MQIgtgz Ua2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=A6vuhSEghmX/9x0Jw6AbTwio7Sk496g+SSjoZqziaRM=; fh=bUsfhlSxo5mbGO/gV6Q/B6Bpk+EeS6wLgNtVxkEE7VY=; b=v0YgNyehxtoWfFBWtHP9BHj0El3v6qVUt7XfPT1l+tozprLa/PCHYzqyQQolJKGMrA AJJMhcgq5RDCNV/eMIj0/SYGEm9q04dlOAjK06fQkmra7K+yOgtlj71sRErTmt7YqBvS Gyu13ZDiJjepLMw8Dnd2D6HaYWtwQ0g++2ce7DN2F3YpNVNRAVJe5OSyZzA5rBVXdnR/ WibI9KUHPbnvD8dxe1t4jNRDN8NxTp4krcUDxobgvIirks8Z2GisOkOqzZuGmBKsOlUt p4Ozfzn8DVXCZeu9/+/OaTaOPx0dQ2RUVEtfSdsb4frdo10lqmHoxhAkVzXDTpbAU49W 2Tsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MbpBG6oS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb9-20020a170906edc900b009924806cd01si1342418ejb.386.2023.08.02.04.37.48; Wed, 02 Aug 2023 04:38:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=MbpBG6oS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232415AbjHBKrp (ORCPT + 99 others); Wed, 2 Aug 2023 06:47:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232449AbjHBKrm (ORCPT ); Wed, 2 Aug 2023 06:47:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBF18103; Wed, 2 Aug 2023 03:47:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5AAC161910; Wed, 2 Aug 2023 10:47:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD478C433CD; Wed, 2 Aug 2023 10:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690973257; bh=A6vuhSEghmX/9x0Jw6AbTwio7Sk496g+SSjoZqziaRM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MbpBG6oS8ognEtAvko3wYiZciDFdMkO+bhmQ+q7W3xGtNZ2oL3hdB68wUYyCrdIeP QT3Jh4MAJPM7sdZ18Rby4F2IBCV+IjS4hJbbTazOU3vboA4a6D70ssXIk/Q64CAVV/ tdO0XtL5FJeWpS6iF1ZsK2bvEjHfwoC0MDvtkjW/KQxUGGvH3fM+SF+wK6qGkiIKlp r2d5js5jM9L50olEVxXiFuHVDmPus/g/dO4yYZre+iz4xA7x7ArSh237CQYHG6CvpX cKqHB1ryry7F4eIU5WFu1umc2ZIj0Z3bf8ACbMUBNjwY6V2upZx1uZVtMl11hFt7wd z6lE0XV6AhoXg== Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-4fe0e201f87so1021204e87.0; Wed, 02 Aug 2023 03:47:37 -0700 (PDT) X-Gm-Message-State: ABy/qLZXuL0DYKcuuALvkC209KI6RyNrERNBJ1VUviH049pqzw2A3I47 OgHx56s0btHAmE3iuhu2gguhXWSmQDanw07aJLs= X-Received: by 2002:ac2:465e:0:b0:4f9:5693:3d2c with SMTP id s30-20020ac2465e000000b004f956933d2cmr1766319lfo.34.1690973255688; Wed, 02 Aug 2023 03:47:35 -0700 (PDT) MIME-Version: 1.0 References: <20230728090916.1538550-1-ardb@kernel.org> <20230728090916.1538550-23-ardb@kernel.org> <20230802102600.GIZMovOIUDAJAXu0F5@fat_crate.local> In-Reply-To: <20230802102600.GIZMovOIUDAJAXu0F5@fat_crate.local> From: Ard Biesheuvel Date: Wed, 2 Aug 2023 12:47:24 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 22/22] x86/efistub: Avoid legacy decompressor when doing EFI boot To: Borislav Petkov Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Evgeniy Baskov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , Peter Jones , Gerd Hoffmann , Dave Young , Mario Limonciello , Kees Cook , Tom Lendacky , "Kirill A . Shutemov" , Linus Torvalds , Joerg Roedel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On Wed, 2 Aug 2023 at 12:26, Borislav Petkov wrote: > > On Fri, Jul 28, 2023 at 11:09:16AM +0200, Ard Biesheuvel wrote: > > The bare metal decompressor code was never really intended to run in a > > hosted environment such as the EFI boot services, and does a few things > > that are problematic in the context of EFI boot now that the logo > > requirements are getting tighter. > > Please spend a sentence or two explaining those. After some time has > passed, no one will remember what that tightening of the requirements > was. > OK. The next paragraph already covers this to some extent, but i'll add some more prose here to clarify it further. > So yeah, other than those minor nitpicks, I like the thing, all in all. > Good. > Pls send v8 so that I can run it here on my machines. A git branch would > be cool too. > OK https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=x86-efistub-cleanup-v8 I'll prepare the v8 based on this branch after doing some more tests on bare metal. I'll probably send it out later today. > As to merging this, I presume you want it to go through tip? > It depends on the timing. If we take the whole thing now, it should ideally go through -tip. There is a conflict with the kexec sev patch you just suggested on the list, though. I'll rebase onto that in any case, but if that causes any problems, we might decide to take everything except the last two (or three *) patches now, and defer those for later. * 'efi/libstub: Add limit argument to efi_random_alloc()' may conflict with some changes that may arrive via the RISC-V tree. That patch is completely independent, so perhaps I should put it on a shared stable branch in the EFI tree. Or alternatively, depending on how you decide to organize the branches, you could put it at the beginning of the topic branch where the RISC-V tree can merge it in. Or we might just ignore the conflict - it just adds a function argument to a function call that gets moved from one source file to the another in the conflicting branch, so it should be rather straight-forward to resolve.