From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.10694.1593784389366941423 for ; Fri, 03 Jul 2020 06:53:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dxe/yptl; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593784388; 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=xDQPVtdITjhFSmyDcnE0j5PDfkP4ASg/0fiMJfP/YbA=; b=dxe/yptlTJcyBiELtbWVe91wr7FTMO7jHErSsbOADrCZQa4+1dV10Tydbo63TnzvuHEO3K uMlnCTtACKkuHXpze5M7uBl2AH9Vcp0VzHSnmNqEDNT+jGbByZZLslquxdo3Y+ormABfLy AAqrn7Ds6tuQJZQ0FRg2wIa9Go7r9N0= 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-305-Trw8VcBIMxyKvdDIlJFq6A-1; Fri, 03 Jul 2020 09:53:00 -0400 X-MC-Unique: Trw8VcBIMxyKvdDIlJFq6A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04C7A10059AB; Fri, 3 Jul 2020 13:52:59 +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 071187AC81; Fri, 3 Jul 2020 13:52:56 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 1/9] MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore (CVE-2019-11098) To: devel@edk2.groups.io, guomin.jiang@intel.com Cc: Michael Kubacki , Jian J Wang , Hao A Wu , Dandan Bi , Liming Gao , Debkumar De , Harry Han , Catharine West References: <20200702051525.1102-1-guomin.jiang@intel.com> <20200702051525.1102-2-guomin.jiang@intel.com> From: "Laszlo Ersek" Message-ID: <1a79edf7-e6f8-3241-67d8-f43490276150@redhat.com> Date: Fri, 3 Jul 2020 15:52:56 +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-2-guomin.jiang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: Michael Kubacki > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614 > > Introduces new changes to PeiCore to move the contents of temporary > RAM visible to the PeiCore to permanent memory. This expands on > pre-existing shadowing support in the PeiCore to perform the following > additional actions: > > 1. Migrate pointers in PPIs installed in PeiCore to the permanent > memory copy of PeiCore. > > 2. Copy all installed firmware volumes to permanent memory. > > 3. Relocate and fix up the PEIMs within the firmware volumes. > > 4. Convert all PPIs into the migrated firmware volume to the corresponding > PPI address in the permanent memory location. > > This applies to PPIs and PEI notifications. > > 5. Convert all status code callbacks in the migrated firmware volume to > the corresponding address in the permanent memory location. > > 6. Update the FV HOB to the corresponding firmware volume in permanent > memory. > > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao > Cc: Debkumar De > Cc: Harry Han > Cc: Catharine West > Signed-off-by: Michael Kubacki > --- > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 402 ++++++++++++++++++ > MdeModulePkg/Core/Pei/Image/Image.c | 115 +++++ > MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 82 ++++ > MdeModulePkg/Core/Pei/PeiMain.h | 168 ++++++++ > MdeModulePkg/Core/Pei/PeiMain.inf | 1 + > MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 16 + > MdeModulePkg/Core/Pei/Ppi/Ppi.c | 287 +++++++++++++ > 7 files changed, 1071 insertions(+) (2) The commit message of this patch should be extended with a simplified call tree of *all* the functions introduced. As follows: PeiCore() DumpPpiList() EvacuateTempRam() ConvertPeiCorePpiPointers() PeiGetPe32Data() ConvertPpiPointersFv() MigrateSecModulesInFv() LoadAndRelocatePeCoffImageInPlace() MigratePeimsInFv() MigratePeim() PeiGetPe32Data() LoadAndRelocatePeCoffImageInPlace() ConvertPpiPointersFv() ConvertStatusCodeCallbacks() ConvertFvHob() RemoveFvHobsInTemporaryMemory() DumpPpiList() Thanks Laszlo