llvm-project/clang/lib
Mitch Phillips 8aa1490513 [MTE] Add -fsanitize=memtag* and friends.
Currently, enablement of heap MTE on Android is specified by an ELF note, which
signals to the linker to enable heap MTE. This change allows
-fsanitize=memtag-heap to synthesize these notes, rather than adding them
through the build system. We need to extend this feature to also signal the
linker to do special work for MTE globals (in future) and MTE stack (currently
implemented in the toolchain, but not implemented in the loader).

Current Android uses a non-backwards-compatible ELF note, called
".note.android.memtag". Stack MTE is an ABI break anyway, so we don't mind that
we won't be able to run executables with stack MTE on Android 11/12 devices.

The current expectation is to support the verbiage used by Android, in
that "SYNC" means MTE Synchronous mode, and "ASYNC" effectively means
"fast", using the Kernel auto-upgrade feature that allows
hardware-specific and core-specific configuration as to whether "ASYNC"
would end up being Asynchronous, Asymmetric, or Synchronous on that
particular core, whichever has a reasonable performance delta. Of
course, this is platform and loader-specific.

Differential Revision: https://reviews.llvm.org/D118948
2022-04-08 12:13:15 -07:00
..
APINotes [clang][APINotes] Fix -Wunused-function warning (NFC) 2021-04-01 09:52:43 +08:00
ARCMigrate [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
AST [clang][ASTImporter] Not using consumeError at failed import of in-class initializer. 2022-04-07 11:07:15 +02:00
ASTMatchers Reland "[ASTMatchers] Output currently matching node on crash" 2022-04-05 21:47:16 +01:00
Analysis [clang][dataflow] Support integral casts 2022-04-05 13:55:32 +00:00
Basic Remove a few effectively-unused FileEntry APIs. NFC 2022-04-07 16:45:47 +02:00
CodeGen [MTE] Add -fsanitize=memtag* and friends. 2022-04-08 12:13:15 -07:00
CrossTU [analyzer][ctu] Only import const and trivial VarDecls 2022-04-01 13:49:39 +02:00
DirectoryWatcher [clang] [DirectoryWatcher] Remove leading \\?\ from GetFinalPathNameByHandleW 2021-11-08 22:21:30 +02:00
Driver [MTE] Add -fsanitize=memtag* and friends. 2022-04-08 12:13:15 -07:00
Edit [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
ExtractAPI [clang][extract-api] Emit "navigator" property of "name" in SymbolGraph 2022-04-08 17:29:00 +01:00
Format [clang-format] Fix a crash in qualifier alignment 2022-04-01 17:30:59 -07:00
Frontend Clarify language option default value behavior; NFC 2022-04-08 10:26:16 -04:00
FrontendTool [C++20][Modules][HU 1/5] Introduce header units as a module type. 2022-03-25 09:17:14 +00:00
Headers [OpenCL] Remove argument names from math builtins 2022-04-06 11:43:59 +01:00
Index [clang] Reformat 2022-03-24 05:56:23 -07:00
IndexSerialization
Interpreter [clang-repl] Add an accessor to our underlying execution engine 2022-03-11 09:24:47 +00:00
Lex [clang][deps] Ensure deterministic filename case 2022-04-08 09:18:00 +02:00
Parse [Clang][Sema] Prohibit statement expression in the default argument 2022-04-06 09:28:20 +08:00
Rewrite Add assert on End iteration distance to Rewriter::getRewrittenText. 2022-01-25 17:26:13 +00:00
Sema [OpenCL] Add generic addrspace guards for get_fence 2022-04-08 12:08:10 +01:00
Serialization [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
StaticAnalyzer [analyzer] Don't track function calls as control dependencies 2022-04-08 10:16:58 +02:00
Testing
Tooling [libTooling] Support TransformerResult<void> in consumer callbacks 2022-03-28 15:39:46 +00:00
CMakeLists.txt [clang][extract-api] Refactor ExtractAPI and improve docs 2022-03-22 13:21:57 -07:00