From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E6F18D801EA for ; Mon, 5 Feb 2024 17:51:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=CTTRahNkoVFul+GCM5fWhFPNe5SFu/CPt958HG51g4c=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707155472; v=1; b=j6p9/OKolgqO3xIBkrUTQOwkk+JcnU+SNDwBeaqoeLVtIn4k4gH20kUpBdg83sHmL1fsFYbA j3TaTqtsZ7bq9OuYArpNwYXoVT1I7MCJQpy3Mnn5Lyt/+svQGXWfwgcrAgpQ4maGHW+of0Ty+9f 8iLgSRvHmjOinXxhJ70rfgE0= X-Received: by 127.0.0.2 with SMTP id DnabYY7687511xUEpwJ6Mvh0; Mon, 05 Feb 2024 09:51:12 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.474.1707155471903720115 for ; Mon, 05 Feb 2024 09:51:12 -0800 X-Received: from [10.137.194.171] (unknown [131.107.160.171]) by linux.microsoft.com (Postfix) with ESMTPSA id 673A4207D842; Mon, 5 Feb 2024 09:51:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 673A4207D842 Message-ID: <6fdac41e-87b9-4f88-a62c-43f222a933ae@linux.microsoft.com> Date: Mon, 5 Feb 2024 09:51:11 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] AArch64 with HeapGuard: page allocations wrongly aligned To: devel@edk2.groups.io, rebecca@os.amperecomputing.com Cc: Leif Lindholm , Ard Biesheuvel , Jian J Wang , Liming Gao , Dandan Bi References: <05f6388b-155e-427d-8e34-0ac571e97fb8@os.amperecomputing.com> <24affef7-eb96-4a82-b9d4-b616eb90024d@os.amperecomputing.com> <17AB84FD31479E00.28523@groups.io> <0a589fed-02f1-4598-bbbc-98bad0e8b04f@linux.microsoft.com> <14dac152-dfea-4ad3-bd52-300990bd1be8@os.amperecomputing.com> <09a8622e-be60-46e2-8e96-447dacb8c12f@linux.microsoft.com> <9696df58-283c-447d-b801-c3bb57b3787d@os.amperecomputing.com> <17ACD713D9397BBF.18300@groups.io> <1d8fd126-2bb1-4dc4-bd2a-d2552eebe068@linux.microsoft.com> <0a32e2fa-aae5-490f-9018-18f8b5133c33@os.amperecomputing.com> From: "Oliver Smith-Denny" In-Reply-To: <0a32e2fa-aae5-490f-9018-18f8b5133c33@os.amperecomputing.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,osde@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: iqAPunwOO2CBIYQujv5PUiYsx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="j6p9/OKo"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none) On 2/5/2024 9:22 AM, Rebecca Cran via groups.io wrote: > On 2/2/2024 5:59 PM, Oliver Smith-Denny wrote: >=20 >> Ok, got sidetracked, but got back to this. Rebecca, can you create a >> bugzilla for this and try this patch: >> >> https://github.com/tianocore/edk2/pull/5339. >> >> I want to get some feedback on it and your testing before I send out a >> patch for it. However, it did fix my repro case where I was failing to >> free runtime memory with page guard enabled, so I believe it should fix >> your case. >> >> I need to fix some minor things like patch check, etc. I also did my >> testing on a slightly old version of master, so may need a minor touch >> up. >=20 > I've created https://bugzilla.tianocore.org/show_bug.cgi?id=3D4674 . >=20 > I cherry-picked your commit into my tree but unfortunately I now get a=20 > crash earlier: >=20 > Loading driver at 0x000F3AA0000 EntryPoint=3D0x000F3AB1514=20 > StatusCodeHandlerRuntimeDxe.efi > InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF F3BFEFD0 > ProtectUefiImageCommon - 0xF3CA0E98 > =C2=A0 - 0x00000000F3AA0000 - 0x0000000000030000 > ConvertPages: range F3ADF000 - F3AF0FFF covers multiple entries > ConvertPages: range F3ADF000 - F3AEFFFF covers multiple entries > ConvertPages: range F3ADF000 - F3AEFFFF covers multiple entries >=20 >=20 > Synchronous Exception at 0x00000000FB8928E4 > PC 0x0000FB8928E4 (0x0000FB886000+0x0000C8E4) [ 0] DxeCore.dll > PC 0x0000FB8A4798 (0x0000FB886000+0x0001E798) [ 0] DxeCore.dll > PC 0x0000FB898798 (0x0000FB886000+0x00012798) [ 0] DxeCore.dll > PC 0x0000F3AB1944 (0x0000F3AA0000+0x00011944) [ 1]=20 > StatusCodeHandlerRuntimeDxe.dll > PC 0x0000FB88D8F0 (0x0000FB886000+0x000078F0) [ 2] DxeCore.dll > PC 0x0000FB899EEC (0x0000FB886000+0x00013EEC) [ 2] DxeCore.dll > PC 0x0000FB89123C (0x0000FB886000+0x0000B23C) [ 2] DxeCore.dll >=20 Well that's a bummer :). I moved to top of tree edk2 and added StatusCodeHandlerRuntimeDxe to the ArmVirtQemu build and I am not seeing your crash. Do you have any PCDs set for this driver? I am running with the HeapGuard PCDs you sent before: gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask|0x0F gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPageType|0xC00000000000FFFF gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPoolType|0xC00000000000FFFF However, I am seeing a crash when the shell launches now, so I will debug this. Something changed in the upstream, probably exposing a bug in my code. Let's see if it is the same thing as you are seeing. Thanks, Oliver -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115124): https://edk2.groups.io/g/devel/message/115124 Mute This Topic: https://groups.io/mt/103810212/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-