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 E175078003C for ; Thu, 15 Feb 2024 19:55:55 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SuM+pIY/3R/eykODdoev9GoH5MuxUdNivUvcmaDeF2E=; 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=1708026954; v=1; b=BgbHBakv3/gxdebGcJFm6n5RgcDxVmiFWYTLxICqSAdv1R/l2OkKeTJMvZAmQJoFYFfCt7Ce hD86jWFZYseC82WzGsYLQ0vqPjfq2pyLycI49s/28jSARqSXTVa7UrEPCZdevcumAmjdER7z/z7 Z4gzowvhM0J3Y3Ar6Dd5lEnQ= X-Received: by 127.0.0.2 with SMTP id VM5OYY7687511x2a8KrEdFy1; Thu, 15 Feb 2024 11:55:54 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.274.1708026954116750230 for ; Thu, 15 Feb 2024 11:55:54 -0800 X-Received: from [10.137.194.171] (unknown [131.107.160.171]) by linux.microsoft.com (Postfix) with ESMTPSA id 95982207F21C; Thu, 15 Feb 2024 11:55:53 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 95982207F21C Message-ID: Date: Thu, 15 Feb 2024 11:55:53 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel][PATCH v1 1/1] MdeModulePkg: DxeCore: Don't Guard Large Runtime Granularity Allocations To: Ard Biesheuvel , devel@edk2.groups.io Cc: Leif Lindholm , Sami Mujawar , Liming Gao References: <20240215003412.30983-1-osde@linux.microsoft.com> From: "Oliver Smith-Denny" In-Reply-To: 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: ODOtK2MyyAym4Aes4wi19LSIx7686176AA= 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=BgbHBakv; 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 2/14/2024 11:50 PM, Ard Biesheuvel wrote: > I looked at the EFI spec again, and EfiACPIReclaimMemory is not > actually listed as a memory type that has this 64k alignment > requirement. This makes sense, given that this memory type has no > significance to the firmware itself, only to the OS. OTOH, reserved > memory does appear there. >=20 > So I suggest we fix that first, and then drop any mention of > EfiACPIReclaimMemory from this patch. At least we'll have heap guard > coverage for ACPI table allocations on arm64 going forward. >=20 > The logic in question was added in 2007 in commit 28a00297189c, so > this was probably the rule on Itanium, but that support is long gone. >=20 I wanted to understand this a little bit further. I do see that the spec does not call out EfiACPIReclaimMemory as needing 64k alignment. However, your statement that the memory type does not have have significance to the FW, only to the OS, so we don't need the 64k alignment is confusing to me. Isn't the 64k alignment needed only for regions that the OS does care about? In order to read this information at their 64k page granularity, doesn't this need to be aligned to 64k? Or are you saying the OS can just read the 64k page(s) containing these 4k aligned EfiACPIReclaimMemory pages and then start reading at the calculated offset from within the larger page, since these pages don't have any pointers to outside memory, unlike image sections? 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 (#115533): https://edk2.groups.io/g/devel/message/115533 Mute This Topic: https://groups.io/mt/104364784/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-