From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.10798.1593784838476123296 for ; Fri, 03 Jul 2020 07:00:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZY18Xvt3; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593784837; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nZRAJrc1KtTyU/Qt0iBus03BeUpZj6wBQtTPYxhpYo8=; b=ZY18Xvt3H0EXS8drCk0JCwRAwCGSO/LnflRSm859YkP5n2m9MZhhAd6vaVEWxAt/CqnNtK NWO1cwaorcROoWtXJ5kiDfMsKflknc0MMWXJCVn93FwnP98+b201HzTc+HHghqOKRyjuGZ 1kPIYDUZUTkbTrKxB8xqYY78dKc0NcU= 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-206-Kb_K3rRDPNyStNhLk1y4Ig-1; Fri, 03 Jul 2020 10:00:34 -0400 X-MC-Unique: Kb_K3rRDPNyStNhLk1y4Ig-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 BE419186A204; Fri, 3 Jul 2020 14:00:32 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-238.ams2.redhat.com [10.36.114.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F0935BAEA; Fri, 3 Jul 2020 14:00:31 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 4/9] MdeModulePkg/DxeIplPeim: Register for shadow on S3 shadowed boot (CVE-2019-11098) To: devel@edk2.groups.io, guomin.jiang@intel.com Cc: Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao References: <20200702051525.1102-1-guomin.jiang@intel.com> <20200702051525.1102-5-guomin.jiang@intel.com> From: "Laszlo Ersek" Message-ID: Date: Fri, 3 Jul 2020 16:00:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200702051525.1102-5-guomin.jiang@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=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 07/02/20 07:15, Guomin Jiang wrote: > From: Jian J Wang > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614 > > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao > Signed-off-by: Jian J Wang > --- > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 3 +++ > MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) (1) The commit message is empty, and therefore useless. Please explain why this change is being made. > diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > index 3f1702854660..4ab54594ed66 100644 > --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > @@ -121,6 +121,9 @@ [Pcd.IA32,Pcd.X64,Pcd.ARM,Pcd.AARCH64] > gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy ## SOMETIMES_CONSUMES > gEfiMdeModulePkgTokenSpaceGuid.PcdImageProtectionPolicy ## SOMETIMES_CONSUMES > > +[Pcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnS3Boot ## CONSUMES > + > [Depex] > gEfiPeiLoadFilePpiGuid AND gEfiPeiMasterBootModePpiGuid > > diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c > index d48028cea0dd..9e1831c69819 100644 > --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c > +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c > @@ -77,7 +77,7 @@ PeimInitializeDxeIpl ( > > BootMode = GetBootModeHob (); > > - if (BootMode != BOOT_ON_S3_RESUME) { > + if (BootMode != BOOT_ON_S3_RESUME || PcdGetBool (PcdShadowPeimOnS3Boot)) { > Status = PeiServicesRegisterForShadow (FileHandle); > if (Status == EFI_SUCCESS) { > // > (2) The above check does not seem complete. I think it should consider "PcdMigrateTemporaryRamFirmwareVolumes". I don't exactly understand the impact of the change, but it seems to potentially affect even such platforms that set "PcdMigrateTemporaryRamFirmwareVolumes" to FALSE; and that seems wrong. Thanks Laszlo