From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web09.39528.1656321264720690475 for ; Mon, 27 Jun 2022 02:14:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b23AHeg6; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656321263; 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=7MkdLP1NOgvCn5X5w48daTdLu3ct49moheiBlJ1qA6s=; b=b23AHeg69RF+LxHw/F0sBRDxTuzanNqEorvrR/Gbaidj/aVZyOa6EwNcu/fLasDrlj3DRA wJZSFQj/btG0KuakqGvwWbGj0AaVwwe5u43WRXG5/Hvzduvzo4ZqSJvrme1x51wNMUB/Vo hE5CVlLayEZ32H5BTILDHlEWsnbBfLg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-mH8nCrz5MyatEqlueOR0PA-1; Mon, 27 Jun 2022 05:14:18 -0400 X-MC-Unique: mH8nCrz5MyatEqlueOR0PA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 473143C1105A; Mon, 27 Jun 2022 09:14:18 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D37640CF8E7; Mon, 27 Jun 2022 09:14:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CD2DA1800084; Mon, 27 Jun 2022 11:14:16 +0200 (CEST) Date: Mon, 27 Jun 2022 11:14:16 +0200 From: "Gerd Hoffmann" To: Min Xu Cc: devel@edk2.groups.io, Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: Re: [PATCH V2 5/8] OvmfPkg/PlatformPei: Update ReserveEmuVariableNvStore Message-ID: <20220627091416.7jun2rh4wy4e54h5@sirius.home.kraxel.org> References: <93072b2c22fbd173b6732baaf0dee9d22a3e5db8.1656210686.git.min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: <93072b2c22fbd173b6732baaf0dee9d22a3e5db8.1656210686.git.min.m.xu@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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, > + #ifdef SECURE_BOOT_FEATURE_ENABLED > + PlatformInitEmuVariableNvStore ((VOID *)(UINTN)VariableStore); > + #endif OvmfPkg/Library/NvVarsFileLib/ allows loading variables into emulated varstore from a on-disk NvVars file. We can't allow that when secure boot is active. I think we need a simliar check there. Shortcutting the ConnectNvVarsToFileSystem() function with a #ifdef SECURE_BOOT_FEATURE_ENABLED return EFI_NOT_SUPPORTED; #endif should do the trick I think. thanks, Gerd