Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp674834rwb; Fri, 7 Oct 2022 02:38:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6aZRP3EA2pgTdZVoqPQmEOfcr+fBI1MD3ckkmTrvsfTGKZxx7tXwvFbx2pLAZkUtofMJwq X-Received: by 2002:a17:907:9803:b0:782:2d55:f98b with SMTP id ji3-20020a170907980300b007822d55f98bmr3271046ejc.338.1665135502119; Fri, 07 Oct 2022 02:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665135502; cv=none; d=google.com; s=arc-20160816; b=dRiHN+eH21ip2KEMi6g2N/HA61XRhZ+Yd//GnJfGqEWhdHr2h/eWN748aIzPnZgKOJ ieeRV0gS71TXCjv5jszYf3+Hoe4qk9cJiU17HqIY9VZMfQMD3dEGX6uFQUqXv2PGcsM4 Hx8HU58EteRTS2ZJBcMpmS7EZ6jEkuf49Wac7PEqlHZYF8+Ey+XAR0vwNjP2h+xsX+Dk iD23JwSAw/QYsnZNCsat51yqO3iZF6wgtj8A27H2RccECZh5A0UYx6HhKODeRx5AUJIf V9RVoJUNgpYECb1eXqWw7+oyv5RsBb4/aAxd31fVWi1DgtNbBYLEH2uwGsv7sAIgAVyZ I4aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n1vckELSkNGpxcbqedOWvmC3fl/6VqPt9RpfZgtr0hs=; b=b06Q+SrzZkkgxeAJ354Od8dEL6ubmc1/5+WJp5w9A8wvlYfhpPuHgg+F8uvd8xJKdz i/X+pmlBC9OVLBGH155w0M+UQEc4po5+o4jNd12IMTTB1Sx6MHVDlTE6Tfu3EVO1C311 Je9AKO700ki6agC0b6q1mzyZ2UKh5V0Gcz9caNBFUVHvFOsI9tAfc1wLJgPpPTz4lDLb BBIuzaleTPGn23O/FDFiK5+oRr7CRCdLKTIbtldOTBlrgHg27x2du1sg+IOqUc1yn3LR SF2MrzYGlomaqWIZzFfDJgY2teqYGXIT6IZLfT0JZY/q9Xy2X3uoNHxFaZdhjm9RZvlj yxTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=odvX9K4h; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020aa7cdc1000000b00457fc1bcf12si1638447edw.183.2022.10.07.02.37.50; Fri, 07 Oct 2022 02:38:22 -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=@alien8.de header.s=dkim header.b=odvX9K4h; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbiJGJa5 (ORCPT + 99 others); Fri, 7 Oct 2022 05:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbiJGJay (ORCPT ); Fri, 7 Oct 2022 05:30:54 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B2C81162DD; Fri, 7 Oct 2022 02:30:51 -0700 (PDT) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 4C8C61EC04E2; Fri, 7 Oct 2022 11:30:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1665135046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=n1vckELSkNGpxcbqedOWvmC3fl/6VqPt9RpfZgtr0hs=; b=odvX9K4hZp1/3aU7XFcXApnWbXdvroDWLdZSr1Ghpwk8s8M31s3Ud2oQSPUa5PF8OXVHYZ ABSfcRM3a+2AAfLgCmzlMB8dIs/bNrmzNlpQ7h1Dn6h9SekXYvfhr/pH1br3evNGZctTHj ltP25cdvwrZXjFn8allLHaylcTl5qVo= Date: Fri, 7 Oct 2022 11:30:42 +0200 From: Borislav Petkov To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , Michael Roth Subject: Re: [PATCH v2 03/16] x86/compressed: efi-mixed: move bootargs parsing out of 32-bit startup code Message-ID: References: <20220921145422.437618-1-ardb@kernel.org> <20220921145422.437618-4-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 Thu, Oct 06, 2022 at 01:29:55PM +0200, Ard Biesheuvel wrote: > Documentation/x86/boot.rst has a section on this (at the end), Ah, and I really like that NOTE at the end. > but we should really stop using it. It is only implemented by > out-of-tree GRUB at the moment (last time I checked) and leaking all > those struct bootparams specific details into every bootloader is not > great, especially the ones that intend to be generic and boot any EFI > OS on any EFI arch. I'm all for making early asm code simpler so yes, can we start removing it? Dunno, maybe ifdef around it with a Kconfig option which is default off and see who complains... > That is the same thing. The EFI stub is what enables the kernel (or > decompressor) to masquerade as a PE/COFF executable. > > In short, every EFI stub kernel on every architecture has a native > PE/COFF entry point that calls the EFI stub, and the EFi stub does the > arch-specific bootloader work and boots it. Right. > In addition, the x86_64 EFI stub kernel has an extra, non-native > PE/COFF entry point, which is exposed in a way that is not covered by > the EFI spec, but which allows Linux specific loaders such as > systemd-boot to boot such kernels on 32-bit firmware without having to > do the whole struct bootparams dance in the bootloader. Ok, thanks for explaining. I like the simplification and obviating the need for the bootloader to do any dancing before loading the kernel. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette