Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2432041rwd; Fri, 2 Jun 2023 09:17:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Yy7nHJWEfEKibWOfKBxikJV2TskamIKJ8EM/xNJtR+yhyyT6fjT5qShO6SB6RcrRDQbDy X-Received: by 2002:a05:6a20:1602:b0:100:efa1:eab0 with SMTP id l2-20020a056a20160200b00100efa1eab0mr11709358pzj.2.1685722643813; Fri, 02 Jun 2023 09:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685722643; cv=none; d=google.com; s=arc-20160816; b=0Yax7MfdoFDEQK17uE5MUoFTmd/YD9XB3NERU7ikYX/6MYzi9PDw0f7/s+zLvpwJV6 /maursa/M4MX9icgmRL4cZF0LdyKSQFRo48aYB6kdFlA4dYVhQ7ifLrdV72ta+cYvfob DS+X2DkkafkJ0sEL9bYdwS5odsm9xV3ygjrYz30BkncT81iy+HvCZz/C4KL7JJtJfIy4 VtRZHjhMtn4ZBiC5ioYiRM3lcssYTYinQQbiouOnGelHdYJ7DGnDQvi/3igvG035Vhwx XP2uz6YV9Ci/ci+JiPf0sovVZgIFcknrweWOj6CeT5n9nnwFX2VrN0wDV4G4uckyYa3i XS2w== 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=eE2uQGqPGpuKbamI8enlt7v5GbxB8kYffAGXDWpEyes=; b=qdvo3pMhWNcRzPOGWof2G4KEyvN2khiIxuU83djwhlpJqGFdvs87MhI4JEZJ0MTzBz rHsgYhpLnGChBdYbBAduVtx/+LvnDTIjneJqjHZSxAauuZW8Bql1CNV/Zg+dvmLShMZb lPu0ZGfrJbuXhYRS+onYBoh7i5zIivZPE1qtCLO7bzvsnFXTAjKp8xaEIDeiSn8K70EW AviQZU0QRick2n40OXhIHRC4Msq2OBXF3f4k7UyDyM32Ko5adwMcbGcqlUG9LbMMSNlR Q0CJq9+GHhbvFXDB8gA5oeGThwOwZJQEomBGrKuyLFixHlBECfTZVosLPU61rEh1G1Oh zdqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b="Rq/hMqBy"; 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 y28-20020aa79e1c000000b006501b3c2009si995796pfq.58.2023.06.02.09.17.08; Fri, 02 Jun 2023 09:17:23 -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="Rq/hMqBy"; 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 S236827AbjFBQM6 (ORCPT + 99 others); Fri, 2 Jun 2023 12:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236842AbjFBQMh (ORCPT ); Fri, 2 Jun 2023 12:12:37 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72573E5B; Fri, 2 Jun 2023 09:11:56 -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 2FA171EC0333; Fri, 2 Jun 2023 18:10:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1685722232; 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=eE2uQGqPGpuKbamI8enlt7v5GbxB8kYffAGXDWpEyes=; b=Rq/hMqByw649WSqiBvHpZIOpoM+dTMMsZLQ3HqEnMsszV4zGGBIqbJn0hfttibA2vSNB5q Du73ZbTLCXoIi2Sklvw/wXFZArPCuVLZI1ALxp3aZm2rATShj6gswT2iVTzLEeQ3K3RY/+ EUQUxW+WzmjfM1W36ZdvHEUOr41oqRQ= Date: Fri, 2 Jun 2023 18:10:31 +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: <20230602161031.GFZHoUd4R9JEQjOrAK@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> 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 05:59:16PM +0200, Ard Biesheuvel wrote: > The problem is that on x86, there is buggy vendor/OEM EFI code that > registers for internal events that trigger when SetVirtualAddressMap() > is called, and assume that at that point, EfiBootServicesData memory > regions have not been touched by the loader yet, which is probably > true if you are booting Windows. > > So on x86, the kernel proper also preserves these regions until after > it calls SetVirtualAddressMap() (efi_free_boot_services() in > arch/x86/platform/efi/quirks.c) > > So for the same reason, this code needs to disregard those regions as well. I'd like for us to have this explanation in the comment since it is being touched anyway. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette