summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Cleanup sorting functionsVitaly Buka2018-05-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331915 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach sanitizer about NetBSD specific ioctl(2) callsKamil Rytarowski2018-02-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Introduce handling of 1200 NetBSD specific ioctl(2) calls. Over 100 operations are disabled as unavailable or conflicting with the existing ones (the same operation number). Add a script that generates the rules to detect ioctls on NetBSD. The generate_netbsd_ioctls.awk script has been written in NetBSD awk(1) (patched nawk) and is compatible with gawk. Generate lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc with the awk(1) script. Update sanitizer_platform_limits_netbsd accordingly to add the needed definitions. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, dvyukov Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, fedor.sergeev, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41636 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325212 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] Basic sanitizer Solaris support (PR 33274)Kamil Rytarowski2017-12-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first mostly working version of the Sanitizer port to 32-bit Solaris/x86. It is currently based on Solaris 11.4 Beta. This part was initially developed inside libsanitizer in the GCC tree and should apply to both. Subsequent parts will address changes to clang, the compiler-rt build system and testsuite. I'm not yet sure what the right patch granularity is: if it's profitable to split the patch up, I'd like to get guidance on how to do so. Most of the changes are probably straightforward with a few exceptions: * The Solaris syscall interface isn't stable, undocumented and can change within an OS release. The stable interface is the libc interface, which I'm using here, if possible using the internal _-prefixed names. * While the patch primarily target 32-bit x86, I've left a few sparc changes in. They cannot currently be used with clang due to a backend limitation, but have worked fine inside the gcc tree. * Some functions (e.g. largefile versions of functions like open64) only exist in 32-bit Solaris, so I've introduced a separate SANITIZER_SOLARIS32 to check for that. The patch (with the subsequent ones to be submitted shortly) was tested on i386-pc-solaris2.11. Only a few failures remain, some of them analyzed, some still TBD: AddressSanitizer-i386-sunos :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos :: TestCases/malloc-no-intercept.c AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/start-deactivated.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/default_options.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/malloc-no-intercept.c SanitizerCommon-Unit :: ./Sanitizer-i386-Test/MemoryMappingLayout.DumpListOfModules SanitizerCommon-Unit :: ./Sanitizer-i386-Test/SanitizerCommon.PthreadDestructorIterations Maybe this is good enough the get the ball rolling. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, jyknight, kubamracek, krytarowski, fedor.sergeev, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40898 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320740 91177308-0d34-0410-b5e6-96231b3b80d8
* sanitizer_common: Fix warningMatthias Braun2016-08-161-1/+2
| | | | | | | | | | Clang added warning that taking the address of a packed struct member possibly yields an unaligned pointer. This case is benign because the pointer gets casted to an uptr and not used for unaligned accesses. Add an intermediate cast to char* until this warning is improved (see also https://reviews.llvm.org/D20561) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278835 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Add iOS support.Anna Zaks2016-02-021-16/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259451 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in ↵Kostya Serebryany2015-09-291-2/+2
| | | | | | lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248816 91177308-0d34-0410-b5e6-96231b3b80d8
* [Msan] Fix the ioctl_custom.cc test to pass on FreeBSDViktor Kutuzov2015-05-061-14/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D9459 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236581 91177308-0d34-0410-b5e6-96231b3b80d8
* Update bogus file permissions.Alexey Samsonov2014-12-081-0/+0
| | | | | | Suggested in http://reviews.llvm.org/D6547. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223715 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Relax sanity checks in ioctl decoding.Evgeniy Stepanov2014-06-101-4/+4
| | | | | | | Standard KVM ioctls don't pass currect ioctl_decode(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210533 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Implement ioctl decoding.Sergey Matveev2014-02-051-4/+39
| | | | | | | When an unknown ioctl is encountered, try to guess the parameter size from the request id. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200872 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Partial revert of recent ioctl changes.Sergey Matveev2014-01-311-123/+0
| | | | | | | | Some build environments are missing the required headers. This reverts r200544, r200547, r200551. This does not revert the change that introduced READWRITE ioctl type. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200567 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Attempt to fix Android build.Sergey Matveev2014-01-311-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200547 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Support most ioctls from /usr/include/sound/.Sergey Matveev2014-01-311-6/+134
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200544 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove #include of net/ip_mroute.h for SANITIZER_MAC.Bob Wilson2013-11-151-1/+1
| | | | | | | | | This header has not been supported at all for the last 2 major OS X releases. Removed its include and the capture of related symbols. <rdar://problem/15303348> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194841 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r188369 (and r188455) which breaks the build on at least someChandler Carruth2013-08-181-0/+2
| | | | | | | Linux systems. I've replied on the original commit thread with details of the problem. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188628 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Split platform_limits_posix into system- and kernel-dependent parts.Evgeniy Stepanov2013-08-141-2/+0
| | | | | | | | | | | | | This change moves everything depending on kernel headers (mostly ioctl types and ids) into a separate source file. This will reduce the possibility of header conflict on various platforms (most importantly, older glibc versions). This change also removes 2 deprecated ioctls, and symbolic ids for other bunch of ambiguous ioctls (i.e. same id is shared by ioctls with different memory behavior). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188369 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix build with OSS4 kernel headers.Evgeniy Stepanov2013-06-261-1/+0
| | | | | | | This fixes PR16453. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184925 91177308-0d34-0410-b5e6-96231b3b80d8
* [santizer] Disable several EVIOxxx ioctls on older kernels.Evgeniy Stepanov2013-06-211-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184539 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix Mac build.Evgeniy Stepanov2013-06-201-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184407 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an outdated comment.Evgeniy Stepanov2013-06-201-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184406 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Handle EVIOxxxx ioctls.Evgeniy Stepanov2013-06-201-4/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184405 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix Android build.Evgeniy Stepanov2013-06-181-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184187 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Remove a set of deprecated ioctls.Evgeniy Stepanov2013-06-181-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184185 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Replace ext2_ ioctls with generic fs_ ioctls.Evgeniy Stepanov2013-06-181-4/+4
| | | | | | | | They are actually the same, but ext2_fs.h header is not available in userspace with newer kernels. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184184 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Symbolic ioctl names.Evgeniy Stepanov2013-06-181-407/+394
| | | | | | | | | | | Replace hardcoded ioctl request ids with symbolic names. Disable certain ioctls on platforms where such names are not found in the system headers. Fix a bug in ioctl_lookup. Reenable ioctl test on Mac. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184183 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix the bug with memalign and malloc_usable_size ↵Kostya Serebryany2013-06-101-2/+2
| | | | | | (http://code.google.com/p/address-sanitizer/issues/detail?id=193); also fix lint git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183647 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Handle SIOCGIFCONF ioctl.Evgeniy Stepanov2013-06-071-3/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183529 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix Android build.Evgeniy Stepanov2013-06-071-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183523 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix windows build.Evgeniy Stepanov2013-06-071-31/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183518 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] ioctl interceptor.Evgeniy Stepanov2013-06-071-0/+546
ASan: disabled by default MSan: enabled by default TSan: disabled git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183517 91177308-0d34-0410-b5e6-96231b3b80d8