llvm-project/compiler-rt/include/sanitizer
Evgeniy Stepanov 4f0e10fff9 [hwasan] Add a (almost) no-interceptor mode.
Summary:
The idea behind this change is to allow sanitization of libc. We are prototyping on Bionic,
but the tool interface will be general enough (or at least generalizable) to support any other libc.

When libc depends on libclang_rt.hwasan, the latter can not interpose libc functions.
In fact, majority of interceptors become unnecessary when libc code is instrumented.

This change gets rid of most hwasan interceptors and provides interface for libc to notify
hwasan about thread creation and destruction events. Some interceptors (pthread_create)
are kept under #ifdef to enable testing with uninstrumented libc. They are expressed in
terms of the new libc interface.

The new cmake switch, COMPILER_RT_HWASAN_WITH_INTERCEPTORS, ON by default, builds testing
version of the library with the aforementioned pthread_create interceptor.
With the OFF setting, the library becomes more of a libc plugin.

Reviewers: vitalybuka, kcc, jfb

Subscribers: srhines, kubamracek, mgorny, jfb, llvm-commits

Differential Revision: https://reviews.llvm.org/D50922

llvm-svn: 340216
2018-08-20 21:49:15 +00:00
..
allocator_interface.h [hwasan] Provide __sanitizer_* aliases to allocator functions. 2018-08-13 21:07:27 +00:00
asan_interface.h [sanitizer] Make function declarations C-compatible 2017-12-21 20:51:16 +00:00
common_interface_defs.h [libFuzzer] Report at most one crash per input. 2018-05-01 21:01:53 +00:00
coverage_interface.h [sanitizer] Make function declarations C-compatible 2017-12-21 20:51:16 +00:00
dfsan_interface.h [sanitizer] add a weak hook for strncmp interceptor, both to dfsan and other sanitizers. Hide the declaration and the calls in better macros 2015-07-30 02:32:51 +00:00
esan_interface.h [sanitizer] Make function declarations C-compatible 2017-12-21 20:51:16 +00:00
hwasan_interface.h [hwasan] Add a (almost) no-interceptor mode. 2018-08-20 21:49:15 +00:00
linux_syscall_hooks.h [sanitizer] Add syscall handlers for sigaction and rt_sigaction. 2016-06-24 23:09:44 +00:00
lsan_interface.h [sanitizer] Make function declarations C-compatible 2017-12-21 20:51:16 +00:00
msan_interface.h [MSan] Add functions to enable/disable interceptor checks. 2018-07-06 17:10:51 +00:00
netbsd_syscall_hooks.h Remove obsolete ptrace(2) operations from NetBSD 2018-03-03 16:21:13 +00:00
scudo_interface.h [scudo] Adding an interface function to print allocator stats 2018-04-25 18:52:29 +00:00
tsan_interface.h [tsan] Add Mutex annotation flag for constant-initialized __tsan_mutex_linker_init behavior 2017-10-20 12:08:53 +00:00
tsan_interface_atomic.h