> On 7. Feb 2023, at 19:19, Taylor Beebe <t...@taylorbeebe.com> wrote:
> 
> If I understand Marvin correctly, he means that there either needs to be a 
> requirement that if you change the attributes of an allocated buffer you must 
> change them back before freeing, or the memory management logic should handle 
> the possibility that the memory attributes may have changed since allocation.

Yes. More explicitly, I fear the former is what is happening and the latter is 
what the protocol and DXE service descriptions suggest.

Best regards,
Marvin

> In my opinion introducing the Memory Attribute Protocol requires more 
> attribute accounting when allocating and freeing. I believe the two changes 
> linked below ensure that attributes are properly set.
> 
> 1. 
> https://github.com/microsoft/mu_basecore/blob/788c17f750323efc206cdb042a2c14a587dcf27a/MdeModulePkg/Core/Dxe/Mem/Page.c#L1570
> 2. 
> https://github.com/microsoft/mu_basecore/blob/788c17f750323efc206cdb042a2c14a587dcf27a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c#L1562



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99762): https://edk2.groups.io/g/devel/message/99762
Mute This Topic: https://groups.io/mt/96664071/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to