Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2511817rwd; Fri, 2 Jun 2023 10:21:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vvHOckqA3fjfYtrqVpGvldyb7omRhkqB/PlgsbjCY9i3QAsoz6EvzIkCxC0/tekomD8yR X-Received: by 2002:a17:90b:fc4:b0:255:5a5e:df38 with SMTP id gd4-20020a17090b0fc400b002555a5edf38mr442425pjb.33.1685726514236; Fri, 02 Jun 2023 10:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685726514; cv=none; d=google.com; s=arc-20160816; b=nWgPrlgE0mo2XmJhYW+IDMoi8YuK20tKltUmwEjPwMkhzc2WHIPE6wQqKPErLxyOt7 KYaEHQ/2KbL/jB+4mJyoLsbWOxwn0FQFnJPOReyK5el72s8siNHxzCXV1BH/6QM5R0vc QyKptJiTu32/5IhrNKkztnpKByzcUs4XPvreXczFWI2txjCwvv22R4bdp0heDXHsE74c TjqHp5mZ4u9UUO4fx4Uyq+zAQjX1x1ks+DiyEzJZgQ0C6o81cFCO7NpaOW7jYOvI4oq3 84k5FLG6N3+CWScmTZhCHcjIEHb2D+/wznK06hDcC42ZWs9bXkN4MpyToSxo2WiSBWQ3 LOWw== 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=v+iZQvcIZDIr0NXpJZ+ESGpCVBA4dbOR+2khS5CocZ0=; b=RirdQ3qmZxZ3qeus7j9OQlh31m5bSUO+SLBWJCVlvLn5PB7x/F6hPflOPp+WfKkout MmZFMk/oVFzyEWTwDCKIUcr/Nk7YUDDxGbZYRS3xOWncai+LlG70y45ov7ILrfefl+0n TlxWbrPaUhPshi5H3qep5+hpkpmJBJkpIVwUT5oRdBeYeg63lo+Jiwo4xdLWaEponFW7 F05fnQ66saIDmgMiYG4r9Cq1Mq642+e3pKDWU0ugexlxeIhrx7SB4XpL9QrZrqC3vX31 DsFv81NoIBXMiec+iS79n/F/D2BAWRMvKZU7SKZXSLA3TvzFagp7G1wEM/KhXPbjU9gQ zUFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=ThydF2An; 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=fail (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 ck13-20020a17090afe0d00b0024dd8ed1373si2989076pjb.185.2023.06.02.10.21.39; Fri, 02 Jun 2023 10:21:54 -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=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=ThydF2An; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236678AbjFBQpl (ORCPT + 99 others); Fri, 2 Jun 2023 12:45:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236232AbjFBQpk (ORCPT ); Fri, 2 Jun 2023 12:45:40 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34F7913E; Fri, 2 Jun 2023 09:45:39 -0700 (PDT) Received: from zn.tnic (pd9530d32.dip0.t-ipconnect.de [217.83.13.50]) (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 B6F841EC04C0; Fri, 2 Jun 2023 18:45:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1685724337; 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=v+iZQvcIZDIr0NXpJZ+ESGpCVBA4dbOR+2khS5CocZ0=; b=ThydF2AnQAysnFBmv2YYs+RDGPGHzgRBIIBQlVAWX9f10VmQMPW5+cBfpzcBqgpcxdCkAT Ur6UEZeQCMbhtKUepfXBNC+Qa46D+yYdomMT2niOsGaKNbX652i0N/Ttl4kJSGqFlL6DEO UW+S+DBYC52QtY32EEQ28rsG3vuW9z8= Date: Fri, 2 Jun 2023 18:45:33 +0200 From: Borislav Petkov To: Ard Biesheuvel Cc: "Kirill A. Shutemov" , Andy Lutomirski , Dave Hansen , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Mike Rapoport , David Hildenbrand , Mel Gorman , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, aarcange@redhat.com, peterx@redhat.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Liam Merwick Subject: Re: [PATCHv13 4/9] x86/boot/compressed: Handle unaccepted memory Message-ID: <20230602164533.GHZHocre9bsQsU5L4+@fat_crate.local> References: <20230601182543.19036-1-kirill.shutemov@linux.intel.com> <20230601182543.19036-5-kirill.shutemov@linux.intel.com> <20230602140641.GKZHn3caQpYveKxFgU@fat_crate.local> <20230602153644.cbdicj2cc6p6goh3@box.shutemov.name> <20230602160900.GEZHoUHHpPKMnzV3bs@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Fri, Jun 02, 2023 at 06:17:13PM +0200, Ard Biesheuvel wrote: > 'EFI code' is ambiguous here. > > Most of the decompressor code is constructed in a way that permits > - booting 'native EFI' via the EFI stub > - booting 'pseudo-EFI' where GRUB or another Linux/x86 specific > bootloader populates boot_params with all the EFI specific information > (system table, memory map, etc) > > This distinction has been abstracted away here, and so we might be > dealing with the second case, and booting from a GRUB that does not > understand accepted memory, but simply copied the EFI memory map > (including unaccepted regions) as it normally does. (Note that the > second case also covers kexec boot, so we do need to support it) Right, I was hoping there to be some glue which sanity-checks boot_params.efi_info instead relying on users to do so and thus have a bunch of duplicated code. So, yes, right after populating the boot_params pointer... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette