[all-commits] [llvm/llvm-project] 4edfcf: [MTE] Add AArch64GlobalsTagging Pass
Mitch Phillips via All-commits
all-commits at lists.llvm.org
Tue Jan 31 09:25:58 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4edfcff71e150770675a19576f698c7bbe788ee2
https://github.com/llvm/llvm-project/commit/4edfcff71e150770675a19576f698c7bbe788ee2
Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
A clang/test/CodeGen/memtag-globals-asm.cpp
M llvm/lib/CodeGen/GlobalMerge.cpp
M llvm/lib/Target/AArch64/AArch64.h
A llvm/lib/Target/AArch64/AArch64GlobalsTagging.cpp
M llvm/lib/Target/AArch64/AArch64Subtarget.cpp
M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
M llvm/lib/Target/AArch64/CMakeLists.txt
M llvm/test/CodeGen/AArch64/O0-pipeline.ll
M llvm/test/CodeGen/AArch64/O3-pipeline.ll
Log Message:
-----------
[MTE] Add AArch64GlobalsTagging Pass
Adds an IR pass for -fsanitize=memtag-globals. This pass goes over the
tag-capable global variables, and replaces them with a tagged global
variable of the same contents. This new global variable will have its
size and alignment adjusted if neccesary so that they're both a multiple
of the tag granule size (16 bytes).
Global merge must also be suppressed for tagged globals, as each global
variable must have a unique tag. This can possibly be relaxed in future;
globals that are identical in size, alignment, and content can possibly
be merged. The major problem comes from tail- or head-merging, which if
left unchecked, could have partially-overlapping global variables with
different memory tags, leading to crashes at runtime.
Reviewed By: fmayer, eugenis
Differential Revision: https://reviews.llvm.org/D133392
More information about the All-commits
mailing list