-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[MTE] Do not allow local aliases to MTE globals #106280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fmayer
merged 7 commits into
main
from
users/fmayer/spr/mte-do-not-allow-local-aliases-to-mte-globals
Oct 22, 2024
Merged
[MTE] Do not allow local aliases to MTE globals #106280
fmayer
merged 7 commits into
main
from
users/fmayer/spr/mte-do-not-allow-local-aliases-to-mte-globals
Oct 22, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Created using spr 1.3.4
@llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-llvm-ir Author: Florian Mayer (fmayer) ChangesFull diff: https://github.com/llvm/llvm-project/pull/106280.diff 1 Files Affected:
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 2bc69cdb712b0a..6b502a08b87d08 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -110,6 +110,10 @@ bool GlobalValue::isInterposable() const {
}
bool GlobalValue::canBenefitFromLocalAlias() const {
+ if (isTagged()) {
+ // Cannot create local aliases to MTE tagged globals.
+ return false;
+ }
// See AsmPrinter::getSymbolPreferLocal(). For a deduplicate comdat kind,
// references to a discarded local symbol from outside the group are not
// allowed, so avoid the local alias.
|
eugenis
approved these changes
Oct 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change and appropriate linker changes (https://r.android.com/3236256)
AOSP boots with memtag-global throughout the platform.
Without this change, we would sometimes generate PC-relative references
to tagged globals, which then do not have the proper tag.