From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8977F740075 for ; Fri, 22 Mar 2024 09:06:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=RPmaWOpz8y+egWHCBca8tgxKKWugtfWP3uU24fdWjSw=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240206; t=1711098369; v=1; b=pJ3Pzdq70Dud8qrhzOt3gP4ylXMvuO6KuqLKsR5D7qooUUa3ru3bz3+nZlvXnx9vJHlqLWri h6Tce9RZVr7+XU6E7avbIlTBFM0wpdEDZDL+aCOxJ9Ul2mqOAb/ki2cVbxcrsLrvsu1A/gEbfxm P9zsh5PgDlQV32MZMMzywhIi7DfnyFCkwsk+uX3HcbZxphUBOLjiEhGZs4wrWEuhm0sHPh3a05G JydWsIxpKw+E43bxYNB3O/HYkkto0LF1UMmcMrA5wZKOfFZPYXlBEFUHbrJv92LKk9ThSxCi15A mQQxKfBIf/IVCZ6iMXf39TNoknsGy7Vpt7plIagZGiCDw== X-Received: by 127.0.0.2 with SMTP id OonFYY7687511xXgG3RLjjJS; Fri, 22 Mar 2024 02:06:09 -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.8423.1711098368568285881 for ; Fri, 22 Mar 2024 02:06:08 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-ihL4WjRYMWu8vHL0SWgOpQ-1; Fri, 22 Mar 2024 05:06:01 -0400 X-MC-Unique: ihL4WjRYMWu8vHL0SWgOpQ-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5632C1869BC3; Fri, 22 Mar 2024 09:06:01 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C155111E404; Fri, 22 Mar 2024 09:06:01 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D8D5118014AE; Fri, 22 Mar 2024 10:05:55 +0100 (CET) Date: Fri, 22 Mar 2024 10:05:55 +0100 From: "Gerd Hoffmann" To: "Sun, CepingX" Cc: "devel@edk2.groups.io" , "Aktas, Erdem" , "Yao, Jiewen" , "Xu, Min M" , "Reshetova, Elena" Subject: Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/QemuBootOrderLib: Measure the etc/boot-menu-wait Message-ID: <4t224udqjvt4kfg45skznhrj6n2ftez3eumgjerblbhl3iwv4c@zbvo45wwqksj> References: <20240312235146.3777997-1-cepingx.sun@intel.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: Fri, 22 Mar 2024 02:06:08 -0700 Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: k8VK7HxTwCiS5fqJMvHXiziWx7686176AA= 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=20240206 header.b=pJ3Pzdq7; 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 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Fri, Mar 22, 2024 at 08:29:28AM +0000, Sun, CepingX wrote: > On Thursday, March 21, 2024 8:25 PM Gerd Hoffmann wrote: > > Well, just try to read them. If present they can just be measured. > > If not present we can either skip them, or measure with an empty data > > field to indicate it is not present. > My understanding : > If the fw_cfg is present, it must be measured and consumed later. > Is this correct? I think that would be the best strategy. In SEC or early PEI read the items, cache them in HOBs, optionally measure them. When consumed just fetch them from the cache. For entries we are measuring caching is mandatory (to make sure we are actually using the same data we have measured). > > But then you have to find and update all callsites (or at least the > > ones where we care about measurement). > In your solution, if we cache all items that need to be measured, > we would have to add a new API (example: QemuFwCfgGetDataFromCache ()) to get the data from cache. No, we only need to update QemuFwCfgSelectItem + QemuFwCfgReadBytes to support reading from the cache. QemuFwCfgGetDataFromCache() can be added as additional API, and callsites have the option to either switch over, or continue to use the existing API. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117032): https://edk2.groups.io/g/devel/message/117032 Mute This Topic: https://groups.io/mt/104880546/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-