From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2C2457803D1 for ; Wed, 11 Sep 2024 08:44:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=AkQeStwXVNC+q7N5SMTPluX0nxPJuS3dKwMyM4nq9Q4=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition:Content-Transfer-Encoding; s=20240830; t=1726044290; v=1; x=1726303489; b=crxE0abvwppOxFUwZXLxe4RxJCQRmvsdVU1HutkHZIXQft2S7PDUtSTDeJd9xgtqLJhnEFkv AywxWzR5rHVK8bm7uZrCnx2iYPzWckoXOFZfV58WAEql3pq1ZiDB/WVmV/J7VCYf50D7OczvvC1 XbDzmZ8cjIeEMv3JFpngyWWa4gDHcHyCVGkQrEOXCXXODJllcrNQVBQwC++j5qdf9igNT7UfWd1 k0WlG/3q9sLxP8gwyveCaEzVCbrx3SVCqF41NjM9m1ftVO6xZz28viZI5ov7FwcmihtIDQxoj2B gLbOJpAHaFNEzggZhdIylqR1zLbjEaGendj7yqUuKg9iQ== X-Received: by 127.0.0.2 with SMTP id LU1lYY7687511xlSPhlymMTJ; Wed, 11 Sep 2024 01:44:49 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.17454.1726044283861941077 for ; Wed, 11 Sep 2024 01:44:44 -0700 X-Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-142-ohkZIDUfPKurTa_aKaUB3w-1; Wed, 11 Sep 2024 04:44:39 -0400 X-MC-Unique: ohkZIDUfPKurTa_aKaUB3w-1 X-Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C94331956077; Wed, 11 Sep 2024 08:44:37 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.146]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 292773000235; Wed, 11 Sep 2024 08:44:37 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 02D531800635; Wed, 11 Sep 2024 10:44:34 +0200 (CEST) Date: Wed, 11 Sep 2024 10:44:34 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, afish@apple.com Cc: leitao@debian.org, ardb@kernel.org, linux-efi@vger.kernel.org, kexec@lists.infradead.org, bhe@redhat.com, vgoyal@redhat.com, ebiederm@xmission.com, rppt@kernel.org, usamaarif642@gmail.com, gourry@gourry.net, rmikey@meta.com Subject: Re: [edk2-devel] EFI table being corrupted during Kexec Message-ID: <5ey4rmwtcnoukoh57o7ysgolyyzjcwnc3x6ao2zzu3l32xee43@o62hzctqe36q> References: <20240910-juicy-festive-sambar-9ad23a@devvm32600> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 11 Sep 2024 01:44:44 -0700 Resent-From: kraxel@redhat.com Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: EiVvwEWigTt1hg24iSFeAaSnx7686176AA= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=crxE0abv; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On Tue, Sep 10, 2024 at 08:44:40AM GMT, Andrew Fish via groups.io wrote: > > > > On Sep 10, 2024, at 6:58 AM, Breno Leitao wrote: > > > > > > We've seen a problem in upstream kernel kexec, where a EFI TPM log event table > > is being overwritten. This problem happen on real machine, as well as in a > > recent EDK2 qemu VM. > > > > Digging deep, the table is being overwritten during kexec, more precisely when > > relocating kernel (relocate_kernel() function). > > > > I've also found that the table is being properly reserved using > > memblock_reserve() early in the boot, and that range gets overwritten later in > > by relocate_kernel(). In other words, kexec is overwriting a memory that was > > previously reserved (as memblock_reserve()). > > > > Usama found that kexec only honours memory reservations from /sys/firmware/memmap > > which comes from e820_table_firmware table. > > The E820 table is not part of the UEFI standard and it is produced by > a library in the OvmfPkg for “special cases” so I guess that lib could > have a bug? This "special case" is direct kernel boot ('qemu -kernel vmlinux') and loading the linux kernel as EFI binary failed. That should only happen with linux kernels so old that they do not have the efi stub. Also note "problem happen on real machine" above, so it clearly is not something OVMF-specific. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120549): https://edk2.groups.io/g/devel/message/120549 Mute This Topic: https://groups.io/mt/108376671/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-