[Lldb-commits] [lldb] [lldb][Linux] Mark memory regions used for shadow stacks (PR #117861)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 9 01:34:18 PST 2025
================
@@ -2796,11 +2796,17 @@ GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo(
// Flags
MemoryRegionInfo::OptionalBool memory_tagged =
region_info.GetMemoryTagged();
- if (memory_tagged != MemoryRegionInfo::eDontKnow) {
+ MemoryRegionInfo::OptionalBool is_shadow_stack =
+ region_info.IsShadowStack();
+
+ if (memory_tagged != MemoryRegionInfo::eDontKnow ||
+ is_shadow_stack != MemoryRegionInfo::eDontKnow) {
response.PutCString("flags:");
- if (memory_tagged == MemoryRegionInfo::eYes) {
+ if (memory_tagged == MemoryRegionInfo::eYes)
response.PutCString("mt");
- }
+ if (is_shadow_stack == MemoryRegionInfo::eYes)
----------------
DavidSpickett wrote:
Yes!
I will fix this but I don't think I will be able to test it because the shadow stack mapping is done by the kernel and it won't enable memory tagging.
https://github.com/llvm/llvm-project/pull/117861
More information about the lldb-commits
mailing list