summaryrefslogtreecommitdiff
path: root/compiler-rt/include
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-12-09 01:31:51 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-12-09 01:31:51 +0000
commitfb9992c3a94ec68d45f4fa7560dd01fa55b35bc3 (patch)
tree8b40d80757d995166475cabc6f41eb258d337d5a /compiler-rt/include
parent0d6b635f8e527b33536440c1c5761c3bc982a3e8 (diff)
Hardware-assisted AddressSanitizer (compiler-rt)
Summary: Runtime library for HWASan, initial commit. Does not randomize tags yet, does not handle stack or globals. Reviewers: kcc, pcc, alekseyshl Subscribers: srhines, kubamracek, dberris, mgorny, llvm-commits, krytarowski Differential Revision: https://reviews.llvm.org/D40935
Diffstat (limited to 'compiler-rt/include')
-rw-r--r--compiler-rt/include/CMakeLists.txt1
-rw-r--r--compiler-rt/include/sanitizer/hwasan_interface.h33
2 files changed, 34 insertions, 0 deletions
diff --git a/compiler-rt/include/CMakeLists.txt b/compiler-rt/include/CMakeLists.txt
index ec3bf40b95e..f964e16df66 100644
--- a/compiler-rt/include/CMakeLists.txt
+++ b/compiler-rt/include/CMakeLists.txt
@@ -6,6 +6,7 @@ if (COMPILER_RT_BUILD_SANITIZERS)
sanitizer/coverage_interface.h
sanitizer/dfsan_interface.h
sanitizer/esan_interface.h
+ sanitizer/hwasan_interface.h
sanitizer/linux_syscall_hooks.h
sanitizer/lsan_interface.h
sanitizer/msan_interface.h
diff --git a/compiler-rt/include/sanitizer/hwasan_interface.h b/compiler-rt/include/sanitizer/hwasan_interface.h
new file mode 100644
index 00000000000..f70d8787596
--- /dev/null
+++ b/compiler-rt/include/sanitizer/hwasan_interface.h
@@ -0,0 +1,33 @@
+//===-- sanitizer/asan_interface.h ------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of HWAddressSanitizer.
+//
+// Public interface header.
+//===----------------------------------------------------------------------===//
+#ifndef SANITIZER_HWASAN_INTERFACE_H
+#define SANITIZER_HWASAN_INTERFACE_H
+
+#include <sanitizer/common_interface_defs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ // This function may be optionally provided by user and should return
+ // a string containing HWASan runtime options. See asan_flags.h for details.
+ const char* __hwasan_default_options();
+
+ void __hwasan_enable_allocator_tagging();
+ void __hwasan_disable_allocator_tagging();
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // SANITIZER_HWASAN_INTERFACE_H