From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id 65FE2AC1352 for ; Wed, 17 Apr 2024 14:34:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vPWajd8u+VXe1Rikklz1H2xvk2uc7hoiI4jZe4SOtIk=; c=relaxed/simple; d=groups.io; h=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:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1713364443; v=1; b=tJlOKAshBGo9KkrhTaWWjUld27FS2KjNJgaKPM9YYGdsHuhDH8WI0L6XAYnQTQQWm8kDxyrJ UF2dj9Vm/W11zIihxU3aRKHob1Wy6QJ5U77V0O9Ik0capEycIwsOGHj49wskAi5LGTGNyRRv+nW xn4l+EaBkpU/np7dhTIMNetImjH5uu1lu3DzR6oRaazqSrVcSv+31vjcfs+ia7UUcLILirJCvbs BBTT7k7BgXLGsRH/T4fFThPkT1p8R+hRu2gl6CfXuxKqQDI7tr7I7hxhcROgoJpur2JEZoDhnrd lyacyZuOYONblNRgUgRUyaZCazBIWaWEH2+Ebg/tLyUmQ== X-Received: by 127.0.0.2 with SMTP id xyOcYY7687511xF5YM8KjRFr; Wed, 17 Apr 2024 07:34:03 -0700 X-Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web10.14567.1713364442280582704 for ; Wed, 17 Apr 2024 07:34:02 -0700 X-Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6ed2170d89fso606498b3a.1 for ; Wed, 17 Apr 2024 07:34:02 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVU+LQglTd3Qet7X7cMwn5bbpc8tpaTpGk9s8kQhcj32t30fKBXKVXOMSdEsJlNxt32/pAjD6nLZxu9OUdYtCUgMIEaMg== X-Gm-Message-State: bvDd8v04CkA6F4kVI6iDlZHOx7686176AA= X-Google-Smtp-Source: AGHT+IHQosqZ6g7wA8kSSGsDdFNSxTWu2IbtaO/cnRtUfkj5q04Hwg1gQf53vNcnWDDAij3UbPPTJg== X-Received: by 2002:a05:6a21:9189:b0:1a9:8898:865a with SMTP id tp9-20020a056a21918900b001a98898865amr8779311pzb.9.1713364441574; Wed, 17 Apr 2024 07:34:01 -0700 (PDT) X-Received: from [10.0.4.35] ([4.155.48.117]) by smtp.gmail.com with ESMTPSA id bz25-20020a056a02061900b005f3d2a9a91bsm9189440pgb.89.2024.04.17.07.34.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Apr 2024 07:34:01 -0700 (PDT) Message-ID: Date: Wed, 17 Apr 2024 07:34:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map To: Oliver Smith-Denny , devel@edk2.groups.io, ardb@kernel.org Cc: Liming Gao References: <20240417022836.1593-1-taylor.d.beebe@gmail.com> <2644bcd1-29c7-4cc0-9600-ae2a2eca9927@gmail.com> From: "Taylor Beebe" 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 Resent-Date: Wed, 17 Apr 2024 07:34:02 -0700 Resent-From: taylor.d.beebe@gmail.com Reply-To: devel@edk2.groups.io,taylor.d.beebe@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Language: en-CA 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=20240206 header.b=tJlOKAsh; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io On 4/17/2024 7:09 AM, Oliver Smith-Denny wrote: > On 4/17/2024 7:05 AM, Taylor Beebe wrote: >> >> On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: >>> Aside from this, I wonder if we can be more aspirational here. These >>> EfiRuntimeServicesCode regions without attributes set are, if I am >>> understanding correctly, from loaded images.=20 >> These EfiRuntimeServicesCode regions without attributes set are >> not part of loaded image memory. I think that's what you meant but >> wanted to clarify. > > Are these regions without attributes from image sections that have > been padded to RUNTIME_PAGE_ALLOCATION_GRANULARITY, i.e. they are > the pads? Or are we saying we don't know what these regions are > at this point? It is true in theory someone could just allocate > an EfiRuntimeServicesCode section. Good question -- I had not considered the extra padding applied to these allocations. It could be either. The memory map returned via GetMemoryMap() will merge descriptors together based on type so it's possible to mistake an unrelated EfiRuntimeServicesCode allocation with padding applied to a runtime image memory allocation if they are contiguous. When the IMAGE_PROPERTIES_RECORD entry is created, perhaps it would be best to set the ImageSize field to the padded allocation size instead of the file size. Is this the difference between virtual size and raw data size? I recall you recently did this in=20 ImagePropertiesRecordLib for the code size of a new entry. -Taylor -=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 (#117924): https://edk2.groups.io/g/devel/message/117924 Mute This Topic: https://groups.io/mt/105570114/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-