<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Library/ImagePropertiesRecordLib, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-08-28T04:43:10+00:00</updated>
<entry>
<title>MdeModulePkg/ImagePropertiesRecordLib: Fix incorrect use of sizeof</title>
<updated>2026-08-28T04:43:10+00:00</updated>
<author>
<name>Mingjie Shen</name>
<email>shen497@purdue.edu</email>
</author>
<published>2026-07-23T23:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=81118e5e355b9c6ff779b1d45a88cb10bb5b8d68'/>
<id>urn:sha1:81118e5e355b9c6ff779b1d45a88cb10bb5b8d68</id>
<content type='text'>
In GetFilename(), the post-loop fallback termination used
sizeof (EfiFileName), which is the size of the CHAR8 * pointer
parameter (8 bytes on X64), not the buffer size. Use EfiFileNameSize -
4 to match the bound of the copy loop above so the string is
terminated at the true end of the buffer.

Tested on OvmfPkgIa32X64, DEBUG, GCC: DumpImageRecords() prints all
runtime image names correctly and NUL-terminated, with no ASSERTs.

Signed-off-by: Mingjie Shen &lt;shen497@purdue.edu&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/ImagePropertiesRecordLib: Reduce debug level</title>
<updated>2024-06-26T12:40:30+00:00</updated>
<author>
<name>Nhi Pham</name>
<email>nhi@os.amperecomputing.com</email>
</author>
<published>2024-06-24T05:22:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=89377ece8f1c7243d25fd84488dcd03e37b9e661'/>
<id>urn:sha1:89377ece8f1c7243d25fd84488dcd03e37b9e661</id>
<content type='text'>
The presense of PdbPointer (PDB file name) is not an error. Hence, the
debug message should be categorized as VERBOSE or INFO. However, the
DEBUG_VERBOSE is more appropriate since the PDB file name is already
output by the PeCoffLoaderRelocateImageExtraAction() function with the
inline "add-symbol-file" when a platform uses the library instance
DebugPeCoffExtraActionLib.

Signed-off-by: Nhi Pham &lt;nhi@os.amperecomputing.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: ImagePropertiesRecordLib: Consolidate Usage</title>
<updated>2024-03-29T23:56:16+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@linux.microsoft.com</email>
</author>
<published>2024-03-29T20:21:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=596f856c13fb9f3a6afb17573a762c6f02654a92'/>
<id>urn:sha1:596f856c13fb9f3a6afb17573a762c6f02654a92</id>
<content type='text'>
Currently, there are multiple instances of code create image
records. ImagePropertiesRecordLib was created to only have
this code in one place. Update the lib to use additional
logic from the copy in MemoryProtection.c before converging
that code to use the lib.

Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;

Acked-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: ImagePropertiesRecordLib: Use SectionAlignment for CodeSize</title>
<updated>2024-03-29T23:56:16+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@linux.microsoft.com</email>
</author>
<published>2024-03-29T20:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1fb6462c67912aa287a6f431475cece2659383b7'/>
<id>urn:sha1:1fb6462c67912aa287a6f431475cece2659383b7</id>
<content type='text'>
When an ImageRecord is stored by ImagePropertiesRecordLib, it reports the
CodeSegmentSize as the SizeOfRawData from the image. However, the image
as loaded into memory is aligned to the SectionAlignment, so
SizeOfRawData is under the actual size in memory. This is important,
because the memory attributes table uses these image records to create
its entries and it will report that the alignment of an image is
incorrect, even though the actual image is correct.

This was discovered on ARM64, which has a 64k runtime page granularity
alignment, which is backed by a 64k section alignment for
DXE_RUNTIME_DRIVERs. The runtime code and data was correctly being
loaded into memory, however the memory attribute table was incorrectly
reporting misaligned ranges to the OS, causing attributes to be
ignored for these sections for OSes using greater than 4k pages.

This patch correctly aligns the CodeSegmentSize to the SectionAlignment
and the corresponding memory attribute table entries are now correctly
aligned and pointing to the right places in memory.

Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Cc: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Cc: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;

Acked-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Marvin H?user &lt;mhaeuser@posteo.de&gt;
Signed-off-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Update DumpImageRecord() in ImagePropertiesRecordLib</title>
<updated>2023-11-27T18:55:18+00:00</updated>
<author>
<name>Taylor Beebe</name>
<email>taylor.d.beebe@gmail.com</email>
</author>
<published>2023-11-03T15:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4ec2fab279fc69d15f69ee8fd8ce52045f788102'/>
<id>urn:sha1:4ec2fab279fc69d15f69ee8fd8ce52045f788102</id>
<content type='text'>
Update DumpImageRecord() to be DumpImageRecords(), and improve
the debug output. The function will output at DEBUG_INFO instead,
and the function will be run in DXE and SMM
MAT logic when the MAT is installed at EndOfDxe on DEBUG builds.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Cc: Jiaxin Wu &lt;jiaxin.wu@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Add Logic to Create/Delete Image Properties Records</title>
<updated>2023-11-27T18:55:18+00:00</updated>
<author>
<name>Taylor Beebe</name>
<email>taylor.d.beebe@gmail.com</email>
</author>
<published>2023-11-03T15:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3565ee6c29ffcb2d4d500e857bc3501b5247aeee'/>
<id>urn:sha1:3565ee6c29ffcb2d4d500e857bc3501b5247aeee</id>
<content type='text'>
Add logic to create and delete image properties records. Where
applicable, redirect existing code to use the new library.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Cc: Jiaxin Wu &lt;jiaxin.wu@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Transition SMM MAT Logic to Use ImagePropertiesRecordLib</title>
<updated>2023-11-27T18:55:18+00:00</updated>
<author>
<name>Taylor Beebe</name>
<email>taylor.d.beebe@gmail.com</email>
</author>
<published>2023-11-03T15:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=aa77dac3fb2c2861ee841809075b615359bf6352'/>
<id>urn:sha1:aa77dac3fb2c2861ee841809075b615359bf6352</id>
<content type='text'>
Now that the bugs are fixed in the MAT logic, we can remove the
duplicate logic from PiSmmCore/MemoryAttributesTable.c and use
ImagePropertiesRecordLib instead.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Cc: Jiaxin Wu &lt;jiaxin.wu@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Add NULL checks and Return Status to ImagePropertiesRecordLib</title>
<updated>2023-11-27T18:55:18+00:00</updated>
<author>
<name>Taylor Beebe</name>
<email>taylor.d.beebe@gmail.com</email>
</author>
<published>2023-11-03T15:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cf78580a34d4794346ab08e0365e74a6f3fc29ca'/>
<id>urn:sha1:cf78580a34d4794346ab08e0365e74a6f3fc29ca</id>
<content type='text'>
Update function headers to clarify the contract of each function and
improve readability. Add NULL checks to all functions that take a
pointer as an argument. Add return status to functions that
may need to return early due to invalid input.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Signed-off-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix MAT SplitTable() Logic</title>
<updated>2023-11-27T18:55:18+00:00</updated>
<author>
<name>Taylor Beebe</name>
<email>taylor.d.beebe@gmail.com</email>
</author>
<published>2023-11-20T20:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7ae0516dd9073eabca495e1f59a03193cdd99614'/>
<id>urn:sha1:7ae0516dd9073eabca495e1f59a03193cdd99614</id>
<content type='text'>
SplitTable() does not properly handle the case where there is
an odd number of code regions within a loaded image. When there are
an odd number of code regions, at least one image region descriptor
is overwritten with uninitialized memory which has caused crashes
in the right conditions.

This failure cases is documented extensively in the following bugzilla:
https://bugzilla.tianocore.org/show_bug.cgi?id=4492

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Signed-off-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix MAT SplitRecord() Logic</title>
<updated>2023-11-27T18:55:18+00:00</updated>
<author>
<name>Taylor Beebe</name>
<email>taylor.d.beebe@gmail.com</email>
</author>
<published>2023-11-20T20:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e2f2bbe208b4c7ebcedacfc8333df1e52cbf07eb'/>
<id>urn:sha1:e2f2bbe208b4c7ebcedacfc8333df1e52cbf07eb</id>
<content type='text'>
SplitRecord() does not handle the case where a memory descriptor
describes an image region plus extra pages before or after the
image region. This patch fixes this case by carving off the
unrelated regions into their own descriptors.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Signed-off-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
</feed>
