[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:43:41 PST 2025
================
@@ -164,12 +164,17 @@ void lldb_private::ParseLinuxSMapRegions(llvm::StringRef linux_smap,
if (!name.contains(' ')) {
if (region) {
if (name == "VmFlags") {
- if (value.contains("mt"))
- region->SetMemoryTagged(MemoryRegionInfo::eYes);
- else
- region->SetMemoryTagged(MemoryRegionInfo::eNo);
+ region->SetMemoryTagged(MemoryRegionInfo::eNo);
+ region->SetIsShadowStack(MemoryRegionInfo::eNo);
+
+ llvm::SmallVector<llvm::StringRef> flags;
+ value.split(flags, ' ', /*MaxSplit=*/-1, /*KeepEmpty=*/false);
+ for (llvm::StringRef flag : flags)
----------------
DavidSpickett wrote:
Current flags are only two characters, but again, risky to assume that will continue.
https://github.com/llvm/llvm-project/pull/117861
More information about the lldb-commits
mailing list