<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Core/PiSmmCore/HeapGuard.c, 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>2025-11-22T18:58:47+00:00</updated>
<entry>
<title>MdeModulePkg: Fix missing NULL tests.</title>
<updated>2025-11-22T18:58:47+00:00</updated>
<author>
<name>Aaron Pop</name>
<email>aaronpop@microsoft.com</email>
</author>
<published>2025-10-22T18:33:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5214f931c9a9bed62e1d5324864c60f25b77590d'/>
<id>urn:sha1:5214f931c9a9bed62e1d5324864c60f25b77590d</id>
<content type='text'>
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp

For items which allocate memory, or get a pointer from another
structure, it is important to validate that the pointers
are not null before they are dereferenced.

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Remove other attribute protection in UnsetGuardPage</title>
<updated>2023-06-30T05:37:40+00:00</updated>
<author>
<name>Dun Tan</name>
<email>dun.tan@intel.com</email>
</author>
<published>2023-05-16T07:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8c9983977676d68466c770846d3e64470b3d8668'/>
<id>urn:sha1:8c9983977676d68466c770846d3e64470b3d8668</id>
<content type='text'>
In UnsetGuardPage(), before SmmReadyToLock, remove NX and RO
memory attribute protection for guarded page since
EfiConventionalMemory in SMRAM is RW and executable before
SmmReadyToLock. If UnsetGuardPage() happens after SmmReadyToLock,
then apply EFI_MEMORY_XP to the guarded page to make sure
EfiConventionalMemory in SMRAM is NX since EfiConventionalMemory
in SMRAM is marked as NX in PiSmmCpuDxe driver when SmmReadyToLock.

Signed-off-by: Dun Tan &lt;dun.tan@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1436aea4d5707e672672a11bda72be2c63c936c3'/>
<id>urn:sha1:1436aea4d5707e672672a11bda72be2c63c936c3</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/Core/PiSmmCore: Fix various typos</title>
<updated>2020-02-10T22:30:07+00:00</updated>
<author>
<name>Antoine Coeur</name>
<email>coeur@gmx.fr</email>
</author>
<published>2020-02-07T01:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4be497df49da98306ef31988e95eb804d123e9d5'/>
<id>urn:sha1:4be497df49da98306ef31988e95eb804d123e9d5</id>
<content type='text'>
Fix various typos in comments and documentation.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Hao A Wu &lt;hao.a.wu@intel.com&gt;
Signed-off-by: Antoine Coeur &lt;coeur@gmx.fr&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Reviewed-by: Hao A Wu &lt;hao.a.wu@intel.com&gt;
Signed-off-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Message-Id: &lt;20200207010831.9046-18-philmd@redhat.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:08+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9d510e61fceee7b92955ef9a3c20343752d8ce3f'/>
<id>urn:sha1:9d510e61fceee7b92955ef9a3c20343752d8ce3f</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg PiSmmCore: Remove redundant functions</title>
<updated>2018-08-21T08:29:04+00:00</updated>
<author>
<name>shenglei</name>
<email>shenglei.zhang@intel.com</email>
</author>
<published>2018-08-08T07:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d637282efea71c8b9e3b0a9afb4be0f15a8fe52f'/>
<id>urn:sha1:d637282efea71c8b9e3b0a9afb4be0f15a8fe52f</id>
<content type='text'>
The functions that are never called have been removed.
They are IsImageInsideSmram,FindImageRecord,SmmRemoveImageRecord,
SmmMemoryAttributesTableConsistencyCheck,DumpSmmMemoryMapEntry,
SmmMemoryMapConsistencyCheckRange,SmmMemoryMapConsistencyCheck,
DumpSmmMemoryMap,ClearGuardMapBit,SetGuardMapBit,AdjustMemoryA,
AdjustMemoryS,IsHeadGuard and IsTailGuard.
FindImageRecord() is called by SmmRemoveImageRecord(); however,
nothing calls SmmRemoveImageRecord().
SmmMemoryMapConsistencyCheckRange() is called by
SmmMemoryMapConsistencyCheck(); however, nothing calls
SmmMemoryMapConsistencyCheck().
https://bugzilla.tianocore.org/show_bug.cgi?id=1062

v2:append the following to the commit message.
- FindImageRecord() is called by SmmRemoveImageRecord(); however,
nothing calls SmmRemoveImageRecord().
- SmmMemoryMapConsistencyCheckRange() is called by
SmmMemoryMapConsistencyCheck(); however, nothing calls
SmmMemoryMapConsistencyCheck().

Cc: Star Zeng &lt;star.zeng@intel.com&gt;
Cc: Eric Dong &lt;eric.dong@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei &lt;shenglei.zhang@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SmmCore: add sanity check for SetMemoryAttributes</title>
<updated>2018-04-13T05:04:59+00:00</updated>
<author>
<name>Jian J Wang</name>
<email>jian.j.wang@intel.com</email>
</author>
<published>2018-04-11T08:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5fef2c7069a846754dda2f6416b11d5554f05ac3'/>
<id>urn:sha1:5fef2c7069a846754dda2f6416b11d5554f05ac3</id>
<content type='text'>
Heap Guard feature needs enough memory and paging to work. Otherwise
calling SetMemoryAttributes to change page attribute will fail. This
patch add necessary check of result of calling SetMemoryAttributes.
This can help users to debug their problem in enabling this feature.

Cc: Star Zeng &lt;star.zeng@intel.com&gt;
Cc: Eric Dong &lt;eric.dong@intel.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Ruiyu Ni &lt;ruiyu.ni@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/PiSmmCore: fix #PF caused by freeing read-only memory</title>
<updated>2018-03-16T07:01:59+00:00</updated>
<author>
<name>Jian J Wang</name>
<email>jian.j.wang@intel.com</email>
</author>
<published>2018-03-15T06:19:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a2f32ef6ff173ef276a661520196fb04bbaec3f9'/>
<id>urn:sha1:a2f32ef6ff173ef276a661520196fb04bbaec3f9</id>
<content type='text'>
SMM core will add a HEADER before each allocated pool memory and clean
up this header once it's freed. If a block of allocated pool is marked
as read-only after allocation (EfiRuntimeServicesCode type of pool in
SMM will always be marked as read-only), #PF exception will be triggered
during memory pool freeing.

Normally EfiRuntimeServicesCode type of pool should not be freed in the
real world. But some test suites will actually do memory free for all
types of memory for the purpose of functionality and conformance test.
So this issue should be fixed anyway.

Cc: Star Zeng &lt;star.zeng@intel.com&gt;
Cc: Eric Dong &lt;eric.dong@intel.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Ruiyu Ni &lt;ruiyu.ni@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Reviewed-by: Ruiyu Ni &lt;ruiyu.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/PiSmmCore: fix bits operation error on a boundary condition</title>
<updated>2018-03-16T07:01:12+00:00</updated>
<author>
<name>Jian J Wang</name>
<email>jian.j.wang@intel.com</email>
</author>
<published>2018-03-15T04:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=883787a2c6f83a59fa56f9529317aa86be71fe91'/>
<id>urn:sha1:883787a2c6f83a59fa56f9529317aa86be71fe91</id>
<content type='text'>
If given address is on 64K boundary and the requested bit number is 64,
all SetBits(), ClearBits() and GetBits() will encounter ASSERT problem
in trying to do a 64 bits of shift, which is not allowed by LShift() and
RShift(). This patch tries to fix this issue by turning bits operation
into whole integer operation in such situation.

Cc: Star Zeng &lt;star.zeng@intel.com&gt;
Cc: Eric Dong &lt;eric.dong@intel.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Ruiyu Ni &lt;ruiyu.ni@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Reviewed-by: Ruiyu Ni &lt;ruiyu.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/PiSmmCore: fix mem alloc issues in heap guard</title>
<updated>2018-03-14T08:15:27+00:00</updated>
<author>
<name>Jian J Wang</name>
<email>jian.j.wang@intel.com</email>
</author>
<published>2018-03-13T08:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=12957e56d26d702ab7be913f6a7a9c14e4bac6a9'/>
<id>urn:sha1:12957e56d26d702ab7be913f6a7a9c14e4bac6a9</id>
<content type='text'>
This patch fixes the same issues in Heap Guard in DXE core, which is fixed
in another patch.

Cc: Star Zeng &lt;star.zeng@intel.com&gt;
Cc: Eric Dong &lt;eric.dong@intel.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
</content>
</entry>
</feed>
