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 8F7F8740035 for ; Tue, 10 Sep 2024 16:16:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qwl9OVfnFUEqcm8htY4f/1HzLYMryDpRkAfv8KKyAG0=; 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; s=20240830; t=1725984978; v=1; x=1726244176; b=G0ohF7uZ4JSluVhZ/UzTKYpQwxJzlwbHnD3WUhsU7loioeNW37xnekhw00hapzsrloDz+qMz GT/V49AlJNK6fCRZp0vx5RBXefRmMHFMFpbRZsmDoMXIVtjNQxnr4+Pl/1/PihVU/9UPN2QBP1T w5KtQ+3ZAk0+lE7pHtZtin3OqBMsQMLDZ8ZXdwTpE303Fzxo73OMZgcPLjGG9hg/jygcIZpyYMu BbM/C0nXd83JVrxwxZpludZHq6zKc3TXb51UeNO1wOzdB44RUWMsl8b9Epyao0DAKxpgUdsHUg4 MyqpjBoyfCkOuqmwnVoKGTV4VZ9SjIZVKHShfYz4uaTIg== X-Received: by 127.0.0.2 with SMTP id h1hdYY7687511xLzaGqkV7Pn; Tue, 10 Sep 2024 09:16:16 -0700 X-Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by mx.groups.io with SMTP id smtpd.web10.312.1725984913152096975 for ; Tue, 10 Sep 2024 09:15:13 -0700 X-Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-457ce5fda1aso46384381cf.1 for ; Tue, 10 Sep 2024 09:15:12 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU5MIX21+O+3jw5fOWwxbpCaBPWbiDsqUxa0II/dSJX89M5Jczod6PP+Zkf2rjNaZRS/JaPyg==@edk2.groups.io X-Gm-Message-State: RHkYZI5GBWy8HPT0n7KhnSGEx7686176AA= X-Google-Smtp-Source: AGHT+IFTpWJi2aFDiPPHk0+23A7HN9yHR65F6ZyPjK7cId6epq0hxHHaXBsc3ShG3FbcaSvGW7M5IQ== X-Received: by 2002:a05:622a:198e:b0:458:294c:39e7 with SMTP id d75a77b69052e-458294c3dd5mr172987661cf.38.1725984911873; Tue, 10 Sep 2024 09:15:11 -0700 (PDT) X-Received: from PC2K9PVX.TheFacebook.com (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45822f93978sm30231351cf.83.2024.09.10.09.15.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 09:15:11 -0700 (PDT) Date: Tue, 10 Sep 2024 12:14:32 -0400 From: Gregory Price To: Breno Leitao Cc: Usama Arif , "Eric W. Biederman" , ardb@kernel.org, linux-efi@vger.kernel.org, kexec@lists.infradead.org, bhe@redhat.com, vgoyal@redhat.com, devel@edk2.groups.io, rppt@kernel.org, rmikey@meta.com, tglx@linutronix.de Subject: Re: [edk2-devel] EFI table being corrupted during Kexec Message-ID: References: <20240910-juicy-festive-sambar-9ad23a@devvm32600> <87ed5rd1qf.fsf@email.froward.int.ebiederm.org> <9b024f7d-e326-46eb-bd88-71a16151fcf0@gmail.com> <20240910-strong-dancing-rottweiler-aaed51@devvm32600> MIME-Version: 1.0 In-Reply-To: <20240910-strong-dancing-rottweiler-aaed51@devvm32600> 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: Tue, 10 Sep 2024 09:16:16 -0700 Resent-From: gourry@gourry.net Reply-To: devel@edk2.groups.io,gourry@gourry.net List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=G0ohF7uZ; dmarc=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 09:09:21AM -0700, Breno Leitao wrote: > hello Usama, > > On Tue, Sep 10, 2024 at 04:46:15PM +0100, Usama Arif wrote: > > --- a/drivers/firmware/efi/tpm.c > > +++ b/drivers/firmware/efi/tpm.c > > @@ -60,7 +60,9 @@ int __init efi_tpm_eventlog_init(void) > > } > > > > tbl_size = sizeof(*log_tbl) + log_tbl->size; > > - memblock_reserve(efi.tpm_log, tbl_size); > > + if (!memblock_reserve(efi.tpm_log, tbl_size)) { > > + arch_update_firmware_area(efi.tpm_log, tbl_size); > > + } > > Shouldn't you reserve the region into 8250 independently of > memblock_reserve() return value? > > Thanks for the patch, > --breno Probably also want some sanity check here that we're not over writing already reserved areas before we just update the map. If we're dealing with the scenario where we can't trust the hardware/efi generated map, we probably want to put a small amount of effort to ensure we're not wrecking the state when the system is working correctly. Only so much we can do in this scenario. ~Gregory -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120546): https://edk2.groups.io/g/devel/message/120546 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] -=-=-=-=-=-=-=-=-=-=-=-