From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web09.13771.1630307028900476981 for ; Mon, 30 Aug 2021 00:03:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SNkXhRUo; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630307028; 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: in-reply-to:in-reply-to:references:references; bh=mS/ifkCf4MMmMEpzN4llhJAcgTXSmt/kUj42/xJqPog=; b=SNkXhRUoHInIylvESd6/6/jeSaNgqLCxLxnk0vsGmGET7RjifYNc39OHhYPNfyy/rj8tl+ Sz0vcSijzRPGP6JtF2WHyQerJkkklmmh4Iu5jK7QEfosaIOXlTj7VFDDw1rEXqZnC4AvmA yHur6v1flPv73imtyWbGuhRgG9XmBRE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-L_Owmh5dPp-Fvds786KhUg-1; Mon, 30 Aug 2021 03:03:44 -0400 X-MC-Unique: L_Owmh5dPp-Fvds786KhUg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A952DA0BE6; Mon, 30 Aug 2021 07:03:42 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AEAD5D6A8; Mon, 30 Aug 2021 07:03:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5068418007A8; Mon, 30 Aug 2021 09:03:39 +0200 (CEST) Date: Mon, 30 Aug 2021 09:03:39 +0200 From: "Gerd Hoffmann" To: Min Xu Cc: devel@edk2.groups.io, Ard Biesheuvel , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: Re: [PATCH V5 1/2] OvmfPkg: Introduce Tdx BFV/CFV PCDs and PcdOvmfImageSizeInKb Message-ID: <20210830070339.u47qq3g7hb4rq3xc@sirius.home.kraxel.org> References: <77440edd1e175207dffcaaa052ce26ae71e6c66c.1630289827.git.min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: <77440edd1e175207dffcaaa052ce26ae71e6c66c.1630289827.git.min.m.xu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > In practice BFV is the code part of Ovmf image. CFV is the vars part of > Ovmf image (exclude the SPARE part). Why do you exclude the spare part? >>From a security point of view I don't think it is a good idea to hard code any assumptions about the layout of the vars volume. > +SET gUefiOvmfPkgTokenSpaceGuid.PcdCfvBase = $(FW_BASE_ADDRESS) > +SET gUefiOvmfPkgTokenSpaceGuid.PcdCfvRawDataOffset = $(VARS_OFFSET) > +SET gUefiOvmfPkgTokenSpaceGuid.PcdCfvRawDataSize = $(VARS_LIVE_SIZE) I'd suggest to use $(VARS_SIZE) here. take care, Gerd