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 E51E378003C for ; Thu, 18 Jan 2024 18:38:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=HZmM4h70iZE9HREGDydekz6h+vfx8v3vhnydjUvgPxk=; 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=1705603107; v=1; b=C7fmd7JGzZavA6dlsH48cNFdL3iJ74GcRajae5jtvedp1TBh2HY/KkwEPEKt5NWejaAjl7Mp hjKc/F2mbA2SwXuY5Bi/gWkcUxQFaJv42xOTFpWSRotpaL0MXwBd+Ohs3FR7YcS2EkYWksy7moW 8TaHufstUUpmbOx/N7zTinCY= X-Received: by 127.0.0.2 with SMTP id YvZOYY7687511xlDG4ggyhLu; Thu, 18 Jan 2024 10:38:27 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.955.1705603106753272142 for ; Thu, 18 Jan 2024 10:38:26 -0800 X-Received: from [10.137.194.171] (unknown [131.107.160.171]) by linux.microsoft.com (Postfix) with ESMTPSA id 218F520DFD81; Thu, 18 Jan 2024 10:38:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 218F520DFD81 Message-ID: <6e76cf82-314a-47cb-9d26-36abf1d3f65a@linux.microsoft.com> Date: Thu, 18 Jan 2024 10:38:26 -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> From: "Oliver Smith-Denny" In-Reply-To: <24affef7-eb96-4a82-b9d4-b616eb90024d@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: qW5WSfSgJ1r22BlQ4lFTDvXGx7686176AA= 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=C7fmd7JG; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 1/18/2024 9:42 AM, Rebecca Cran via groups.io wrote: > On 1/18/2024 9:48 AM, Oliver Smith-Denny via groups.io wrote: >=20 >> Are you including this commit:=20 >> https://github.com/tianocore/edk2/commit/00b51e0d78a547dd78119ec44fcc74a= 01b6f79c8? >> >> Can you share some more details on where this is failing? I.e. what >> assert is getting tripped? Presumably without HeapGuard enabled, you >> aren't seeing the failure? >> >> Are you hitting this case: >> https://github.com/tianocore/edk2/blob/59f024c76ee57c2bec84794536302fc77= 0cd6ec2/MdeModulePkg/Core/Dxe/Mem/Page.c#L1570-L1573? >> >> Does this repro on ArmVirtPkg? >=20 > Yes, I have that commit in my tree. >=20 > I'm hitting this assert in FreePages:=20 > https://github.com/tianocore/edk2/blob/59f024c76ee57c2bec84794536302fc770= cd6ec2/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.= c#L190 >=20 > It's called by SmbiosCreate64BitTable:=20 > https://github.com/tianocore/edk2/blob/59f024c76ee57c2bec84794536302fc770= cd6ec2/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c#L1342 >=20 > And yes, that's the case I'm hitting. >=20 > I'm having trouble getting ArmVirtPkg to run. Would it be useful testing= =20 > using SbsaQemu instead? >=20 Yeah, if you can get it running there, that would be a good data point. I assume you mean the Project Mu QemuSbsaPkg? If so that is great, but you will need to update the RUNTIME_PAGE_ALLOCATION_GRANULARITY back to 0x10000. It was set to 0x1000 for a historical issue that we are working on reconciling with what edk2 has. If you can get an open source repro, I'm happy to take a look at the failure. To clarify, if you turn off pool guard, does the assert go away? I am suspicious that we are checking for the alignment before we adjust the memory for the guard. I'm wondering if we actually should do AdjustMemoryF (recalling function from memory) before we check the alignment. 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 (#114003): https://edk2.groups.io/g/devel/message/114003 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-