From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.158.5]) by mx.groups.io with SMTP id smtpd.web11.1745.1606335087813041318 for ; Wed, 25 Nov 2020 12:11:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Jt2H9V5P; spf=pass (domain: linux.ibm.com, ip: 148.163.158.5, mailfrom: jejb@linux.ibm.com) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0APK1CGr189671; Wed, 25 Nov 2020 15:11:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : reply-to : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=uJPl6ZFphhOeOuNAunwV6ByGwRwrNlYieF+gO+dJ6v8=; b=Jt2H9V5PXvxhp30aaxQKnY0V0WdF4q6wMOe9TT139XbF0JUCftiAxN28Wh/SFlAj+Cgy 1opFctVVxJbl28+4WZlaQrebSqzaL93qvkHsvq3YvULnQ7fEpWQ0BYV/G0ndwN2GzQ7V /KywELN6NY6CcFpQu5SyGcandAX2gRXLtTGTJrbpHjwGTJk/58Vty3jlzrJkAAklMT/x O8Fvaa31EXGgl3WtQuJtyQKsGzuJWPZXWqcilCwFmlr6M2wMJ74XyjcSnwhk0ogctiTB ErO1pduEP18SVlJsARXKALeJqqRxSTT0QeIjW54t+tWklDXbzdahLytecn/u9GHeLrxL EQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 351wt1rcp1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Nov 2020 15:11:08 -0500 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0APK1E7s189947; Wed, 25 Nov 2020 15:11:08 -0500 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com with ESMTP id 351wt1rcnr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Nov 2020 15:11:08 -0500 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0APK78R2011134; Wed, 25 Nov 2020 20:11:07 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma02dal.us.ibm.com with ESMTP id 34xthaagya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Nov 2020 20:11:07 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0APKB3oD8258132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Nov 2020 20:11:04 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D33B878069; Wed, 25 Nov 2020 20:11:03 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 56FAC7805E; Wed, 25 Nov 2020 20:11:01 +0000 (GMT) Received: from jarvis.int.hansenpartnership.com (unknown [9.85.194.234]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 25 Nov 2020 20:11:01 +0000 (GMT) Message-ID: Subject: Re: [edk2-devel] [PATCH v2 2/6] OvmfPkg/AmdSev: add Grub Firmware Volume Package From: "James Bottomley" Reply-To: jejb@linux.ibm.com To: Laszlo Ersek , devel@edk2.groups.io, Bret Barkelew , "Liming Gao (Byosoft address)" Cc: dovmurik@linux.vnet.ibm.com, Dov.Murik1@il.ibm.com, ashish.kalra@amd.com, brijesh.singh@amd.com, tobin@ibm.com, david.kaplan@amd.com, jon.grimm@amd.com, thomas.lendacky@amd.com, frankeh@us.ibm.com, "Dr . David Alan Gilbert" , "Ard Biesheuvel (ARM address)" Date: Wed, 25 Nov 2020 12:11:00 -0800 In-Reply-To: References: <20201120184521.19437-1-jejb@linux.ibm.com> <20201120184521.19437-3-jejb@linux.ibm.com> <28e99174-79b3-e805-b977-5fed0071a702@redhat.com> <06b9425507ab8c1b35d377cf9bba155b0cc44147.camel@linux.ibm.com> <3b7899fa-fa52-7652-2d2a-d4ec67ece34d@redhat.com> <1c871b56-f459-5ac4-3b8d-a55d978eac06@redhat.com> <93fdaca88b53d400670b338a06fd1410c1445a39.camel@linux.ibm.com> <082a97c2-9a49-acf6-fd7c-70ee6b61c000@redhat.com> <5b9b21c3eb37ba7024c1cb85ead267867b323c7d.camel@linux.ibm.com> <1064db1d53315987bf8bb478894a07bda8d90a96.camel@linux.ibm.com> <74d01a4212b95e7100b9b959fe1dd3ada0a42a68.camel@linux.ibm.com> User-Agent: Evolution 3.34.4 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-25_11:2020-11-25,2020-11-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011250121 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Wed, 2020-11-25 at 20:20 +0100, Laszlo Ersek wrote: > On 11/25/20 19:17, James Bottomley wrote: [...] > > diff --git > > a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c > > b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c > > index 5029ddb96adb..12944ac7ea81 100644 > > --- a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c > > +++ b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c > > @@ -411,7 +411,7 @@ RegisterVariablePolicy ( > > } > > > > // Reallocate and copy the table. > > - NewTable = AllocatePool( NewSize ); > > + NewTable = AllocateRuntimePool( NewSize ); > > if (NewTable == NULL) { > > return EFI_OUT_OF_RESOURCES; > > } > > > > ... yes. :) > > Since you got to writing this up and testing it first, can you please > file a new TianoCore BZ about the issue (kernel crash log welcome), > and post this patch to edk2-devel stand-alone? OK, done: https://bugzilla.tianocore.org/show_bug.cgi?id=3092 And about to press send. > One request for the commit message: right after "Fix this by making > it AllocateRuntimePool", please add: > > "For SMM drivers, the platform DSC is responsible for resolving the > MemoryAllocationLib class to the SmmMemoryAllocationLib instance. In > the SmmMemoryAllocationLib instance, AllocatePool() and > AllocateRuntimePool() are implemented identically. Therefore this > change is a no-op when the RegisterVariablePolicy() function is built > into an SMM driver. The fix affects runtime DXE drivers only." Added. James