summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_common_syscalls.inc
AgeCommit message (Collapse)Author
2016-06-24[sanitizer] Add syscall handlers for sigaction and rt_sigaction.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273746 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[msan] Fix syscall handlers for pipe, pipe2, socketpair.Evgeniy Stepanov
These syscalls write two file descriptors into the output buffer, not one. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-26[sanitizer] [SystemZ] Add ptrace support bits.Marcin Koscielnicki
Differential Revision: http://reviews.llvm.org/D19134 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267548 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-16[MSan] Enable MSAN for aarch64Adhemerval Zanella
This patch enabled msan for aarch64 with 39-bit VMA and 42-bit VMA. As defined by lib/msan/msan.h the memory layout used is for 39-bit is: 00 0000 0000 - 40 0000 0000: invalid 40 0000 0000 - 43 0000 0000: shadow 43 0000 0000 - 46 0000 0000: origin 46 0000 0000 - 55 0000 0000: invalid 55 0000 0000 - 56 0000 0000: app (low) 56 0000 0000 - 70 0000 0000: invalid 70 0000 0000 - 80 0000 0000: app (high) And for 42-bit VMA: 000 0000 0000 - 100 0000 0000: invalid 100 0000 0000 - 11b 0000 0000: shadow 11b 0000 0000 - 120 0000 0000: invalid 120 0000 0000 - 13b 0000 0000: origin 13b 0000 0000 - 2aa 0000 0000: invalid 2aa 0000 0000 - 2ab 0000 0000: app (low) 2ab 0000 0000 - 3f0 0000 0000: invalid 3f0 0000 0000 - 400 0000 0000: app (high) Most of tests are passing with exception of: * Linux/mallinfo.cc * chained_origin_limits.cc * dlerror.cc * param_tls_limit.cc * signal_stress_test.cc * nonnull-arg.cpp The 'Linux/mallinfo.cc' is due the fact AArch64 returns the sret in 'x8' instead of default first argument 'x1'. So a function prototype that aims to mimic (by using first argument as the return of function) won't work. For GCC one can make a register alias (register var asm ("r8")), but for clang it detects is an unused variable and generate wrong code. The 'chained_origin_limits' is probably due a wrong code generation, since it fails only when origin memory is used (-fsanitize-memory-track-origins=2) and only in the returned code (return buf[50]). The 'signal_streess_test' and 'nonnull-arg' are due currently missing variadic argument handling in memory sanitizer code instrumentation on LLVM side. Both 'dlerror' and 'param_tls_test' are unknown failures that require further investigation. All the failures are XFAIL for aarch64 for now. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-25[msan] Teach sanitizers about the PPC64 ptrace syscallJay Foad
Summary: This fixes test/msan/Linux/syscalls.cc, and should also fix the ppc64 sanitizer buildbots which are currently failing in "make check-sanitizer". Reviewers: samsonov, wschmidt, eugenis Reviewed By: eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10734 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240692 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-24Allow sanitizer to work with "old" kernel headersRenato Golin
Sanitizers work on ancient kernels and were depending on types existing. When those types were removed, the sanitizer build broke. See bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59009 for more information. This patch fixes it by isolating the need for those types only when the feature is actually needed, thus allowing one to compile the kernel with or without that change, irrespective of its version. Patch by Christophe Lyon. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230324 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18[MSan][MIPS] Fix for some failing tests on MIPS64Mohit K. Bhakkad
Enabling internal ptrace for mips, which fixes some ptrace related tests. Along with this fixing some other failures. Reviewers: Reviewers: eugenis, kcc, samsonov Subscribers: dsanders, sagar, lldb-commits Differential Revision: http://reviews.llvm.org/D7332 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229656 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-08[msan] Fix wrong array index in io_submit interceptor.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217362 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-03[asan] i686-linux-android support.Evgeniy Stepanov
Large part of this change is required due to https://code.google.com/p/android/issues/detail?id=61799 dlsym() crashes when symbol resolution fails, which means we have to limit the interceptor list instead of relying on runtime detection. There are minor differencies in system headers, too. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212273 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12[sanitizer] Intercept capget()/capset().Sergey Matveev
Also, fix incorrect syscall hooks for the corresponding syscalls. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201252 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10[sanitizer] Disable 3 more syscall hooks on Android.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201070 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10[sanitizer] struct ustat and a bunch of other definitions are missing on ↵Evgeniy Stepanov
Android. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201068 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-30[msan] Intercept *getxattr and *listxattr.Sergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-27tsan: support synchronization by means of linux aioDmitry Vyukov
http://llvm-reviews.chandlerc.com/D2269 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195830 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22[sanitizer] Restore perf_event_attr handling.Evgeniy Stepanov
This time in a forward/backward compatible way. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195434 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22[sanitizer] Fix build.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195433 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20[msan] Tweak io_submit syscall hook.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195246 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01[sanitizer] Enhance io_submti syscall handler.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193848 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-30[asan] Fix syscall hooks build on Android.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193670 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29[sanitizer] Ptrace syscall handler.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193633 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29[msan] Intercept shmat.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-15tsan: move kernel struct definition from sanitizer_linux.h to ↵Dmitry Vyukov
sanitizer_platform_limits_posix.h git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192695 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-15tsan: implement internal syscall-based versions of sigaction/sigprocmaskDmitry Vyukov
use them in stoptheworld fixes applications that intercept sigaction/sigprocmask git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192686 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21tsan: intercept fork syscallDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191144 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21tsan: intercept close syscallDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191129 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-06[sanitizer] Avoid including any system headers in the system-header-free ↵Evgeniy Stepanov
part of the runtime library. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190161 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-06[sanitizer] A bunch of linux system call handlers.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190157 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06[libsanitizer] Drive-by fix for -Wempty-body in sanitizer_common_syscalls.incAlexander Potapenko
This makes the file consistently use { } around the if statements containing the PRE_/POST_ macros. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187797 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05Lint fixesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30[sanitizer] Tweak read syscall handler signature for consistency.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187417 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30[sanitizer] read() syscall hook.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187414 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15Fix check_lint warnings in sanitizers' runtime librariesTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186328 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09[sanitizer] Wrap lines >80 chars.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185920 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09[sanitizer] Syscall handlers for clock_gettime and clock_getres.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185913 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22[sanitizer] Fix lint.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180012 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Wrap macro invocations in braces to supress 'suggest braces around empty ↵Andy Gibbs
body in an ‘if’ statement' warning. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179597 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16[sanitizer] Implement wait4 and waitpid syscall hooks.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179592 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[sanitizer] More syscall handler placeholders.Evgeniy Stepanov
This time it's the full list scavenged from syscalls.h Fixed return value type. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179378 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[sanitizer] Syscall hooks.Evgeniy Stepanov
Pre- and post- hooks for linux syscalls. Not wired into anything, but exposed through public interface. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179288 91177308-0d34-0410-b5e6-96231b3b80d8