summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/sanitizer_common to .cppNico Weber2019-07-311-2345/+0
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated (many) references to renamed files found by that. llvm-svn: 367463
* Fix build on NetBSD 8.99.38Kamil Rytarowski2019-05-081-0/+2
| | | | | | | | With recent changes the dev/nvmm/nvmm_ioctl.h header is no longer a standalone NVMM header. Disable it until the NVMM operations will stabilize and be included in the ioctl(2) interceptors. llvm-svn: 360212
* Update the ioctl(2) list in sanitizers with NetBSD 8.99.34Kamil Rytarowski2019-02-051-5/+0
| | | | llvm-svn: 353224
* 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. llvm-svn: 351636
* [Sanitizer] Intercept sl_add api on FreeBSD/NetBSDDavid Carlier2019-01-151-0/+2
| | | | | | | | | | Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56670 llvm-svn: 351189
* [sanitizer_common] Define __sanitizer_FILE on NetBSDMichal Gorny2019-01-101-0/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D56109 llvm-svn: 350882
* Fix a mistake in previousKamil Rytarowski2018-12-281-2/+2
| | | | | | Assign correct ioctl(2) operation number. llvm-svn: 350110
* Update NetBSD ioctl(2) entries with 8.99.28Kamil Rytarowski2018-12-271-0/+18
| | | | | | | | | Add SIOCSETHERCAP. Add commented out NVMM (NetBSD Virtual Machine Monitor) operations as this interface is still WIP and a subject to change. llvm-svn: 350107
* [Sanitizer] Add fstab api to FreeBSD/LinuxDavid Carlier2018-12-271-0/+2
| | | | | | | | | | | | Interception of /etc/fstab function parsers. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56099 llvm-svn: 350099
* Add new interceptors for vis(3) API in NetBSDKamil Rytarowski2018-12-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for the NetBSD style of vis(3) present inside libc: - vis - nvis - strvis - stravis - strnvis - strvisx - strnvisx - strenvisx - svis - snvis - strsvis - strsnvis - strsvisx - strsnvisx - strsenvisx - unvis - strunvis - strnunvis - strunvisx - strnunvisx Add a dedicated test verifying the installed interceptors. Based on original work by Yang Zheng. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54594 llvm-svn: 349018
* Add data types needed for md2(3)/NetBSD interceptorsKamil Rytarowski2018-12-101-0/+3
| | | | | | Missing part of D55469. llvm-svn: 348747
* Add interceptors for the sha2(3) from NetBSDKamil Rytarowski2018-12-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: SHA224_Init, SHA224_Update, SHA224_Final, SHA224_End, SHA224_File, SHA224_FileChunk, SHA224_Data, SHA256_Init, SHA256_Update, SHA256_Final, SHA256_End, SHA256_File, SHA256_FileChunk, SHA256_Data, SHA384_Init, SHA384_Update, SHA384_Final, SHA384_End, SHA384_File, SHA384_FileChunk, SHA384_Data, SHA512_Init, SHA512_Update, SHA512_Final, SHA512_End, SHA512_File, SHA512_FileChunk, SHA512_Data – calculates the NIST Secure Hash Standard (version 2) Add tests for new interceptors. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54987 llvm-svn: 348745
* Add new interceptors for FILE repositioning streamKamil Rytarowski2018-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Add new interceptors for a set of functions to reposition a stream: fgetpos, fseek, fseeko, fsetpos, ftell, ftello, rewind . Add a dedicated test. Enable this interface on NetBSD. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55471 llvm-svn: 348743
* Add interceptors for md5(3) from NetBSDKamil Rytarowski2018-12-081-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: MD5Init, MD5Update, MD5Final, MD5End, MD5File, MD5Data - calculates the RSA Data Security, Inc., "MD5" message digest. Add a dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54993 llvm-svn: 348679
* Add interceptors for the rmd160(3) from NetBSDKamil Rytarowski2018-12-081-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: RMD160Init, RMD160Update, RMD160Final, RMD160Transform, RMD160End, RMD160File, RMD160Data - calculates the ``RIPEMD-160'' message digest. Add a dedicated test for this API. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54991 llvm-svn: 348678
* Add interceptors for the md4(3) from NetBSDKamil Rytarowski2018-12-081-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: MD4Init, MD4Update, MD4Final, MD4End, MD4File, MD4Data - calculates the RSA Data Security, Inc., "MD4" message digest. Add dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54990 llvm-svn: 348677
* Add interceptors for the sha1(3) from NetBSDKamil Rytarowski2018-12-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for: - SHA1Init - SHA1Update - SHA1Final - SHA1Transform - SHA1End - SHA1File - SHA1FileChunk - SHA1Data Add a dedicated regression test for this API. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: mgorny, llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54927 llvm-svn: 348676
* Add a new interceptor for modctl(2) from NetBSDKamil Rytarowski2018-12-051-0/+11
| | | | | | | | | | | | | | | | | | | Summary: modctl - controls loadable kernel modules. Skip tests as this call uses privileged operations. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55025 llvm-svn: 348370
* Add interceptors for the fts(3) API family from NetBSDKamil Rytarowski2018-12-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: fts(3) is API to traverse a file hierarchy. Cover this interface with interceptors. Add a test to validate the interface reading the number of regular files in /etc. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54247 llvm-svn: 348227
* Add new interceptor for regex(3) in NetBSDKamil Rytarowski2018-12-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for the NetBSD style of regex(3) present inside libc: - regcomp - regexec - regerror - regfree - regnsub - regasub Add a dedicated test verifying the installed interceptors. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54584 llvm-svn: 348224
* [Sanitizer] Adding setvbuf in supported platforms and other stream buffer ↵David Carlier2018-11-211-0/+2
| | | | | | | | | | | | | | | functions - Enabling setvbuf interceptions for non NetBSD platforms. - setbuf, setbuffer, setlinebuf as well. Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D54779 llvm-svn: 347426
* Update ioctl(2) operations for NetBSD 8.99.25Kamil Rytarowski2018-10-311-15/+28
| | | | | | | | | | | | Eliminate dropped operations, add new operations. Update included headers for newer need. Add a fallback definition of nvlist_ref_t, becaue this type is internal to libnpf and the kernel, not exported into public headers. llvm-svn: 345726
* Cleanup includes in sanitizer_platform_limits_netbsd.ccKamil Rytarowski2018-10-301-105/+119
| | | | | | | | Sort the headers more correctly according to NetBSD style. Prevent in this code part clang-format, as shuffling the order will cause build failures. llvm-svn: 345586
* Remove obsolete ptrace(2) operations from NetBSDKamil Rytarowski2018-03-031-2/+0
| | | | | | | | | PT_SET_SIGMASK and PT_GET_SIGMASK will be removed from NetBSD without backward compat (it shortlived in a development branch). Sponsored by <The NetBSD Foundation> llvm-svn: 326657
* Add new interceptors: getttyent(3) familyKamil Rytarowski2018-02-271-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: getttyent, getttynam, setttyentpath - get ttys file entry Reuse them on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43539 llvm-svn: 326161
* Teach sanitizer about NetBSD specific ioctl(2) callsKamil Rytarowski2018-02-151-39/+1902
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 325212
* Correct NetBSD support in pthread_once(3)/TSanKamil Rytarowski2017-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The pthread_once(3)/NetBSD type is built with the following structure: struct __pthread_once_st { pthread_mutex_t pto_mutex; int pto_done; }; Set the pto_done position as shifted by __sanitizer::pthread_mutex_t_sz from the beginning of the pthread_once struct. This corrects deadlocks when the pthread_once(3) function is used. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dvyukov, vitalybuka Reviewed By: dvyukov Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40262 llvm-svn: 318742
* Correct NetBSD build issueKamil Rytarowski2017-11-111-1/+1
| | | | | | | | | | | Cast SIG_IGN to (uptr). SIG_IGN is defined on NetBSD as a function pointer and cannot be assigned to an integer as it is. sys/signal.h:#define SIG_IGN ((void (*)(int)) 1) llvm-svn: 317978
* [tsan] Move out more types to sanitizer_commonVitaly Buka2017-11-101-3/+4
| | | | | | https://github.com/google/sanitizers/issues/637 llvm-svn: 317946
* Add NetBSD improvements in sanitizersKamil Rytarowski2017-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Changes: * Add initial msan stub support. * Handle NetBSD specific pthread_setname_np(3). * NetBSD supports __attribute__((tls_model("initial-exec"))), define it in SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE. * Add ReExec() specific bits for NetBSD. * Simplify code and add syscall64 and syscall_ptr for !NetBSD. * Correct bunch of syscall wrappers for NetBSD. * Disable test/tsan/map32bit on NetBSD as not applicable. * Port test/tsan/strerror_r to a POSIX-compliant OSes. * Disable __libc_stack_end on NetBSD. * Disable ReadNullSepFileToArray() on NetBSD. * Define struct_ElfW_Phdr_sz, detected missing symbol by msan. * Change type of __sanitizer_FILE from void to char. This helps to reuse this type as an array. Long term it will be properly implemented along with SANITIZER_HAS_STRUCT_FILE setting to 1. * Add initial NetBSD support in lib/tsan/go/buildgo.sh. * Correct referencing stdout and stderr in tsan_interceptors.cc on NetBSD. * Document NetBSD x86_64 specific virtual memory layout in tsan_platform.h. * Port tests/rtl/tsan_test_util_posix.cc to NetBSD. * Enable NetBSD tests in test/msan/lit.cfg. * Enable NetBSD tests in test/tsan/lit.cfg. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, kcc, dvyukov Reviewed By: dvyukov Subscribers: #sanitizers, llvm-commits, kubamracek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D39124 llvm-svn: 316591
* Add NetBSD specific version of sanitizer_platform_limits_posixKamil Rytarowski2017-08-281-0/+359
Summary: NetBSD is an Open-Source POSIX-like BSD Operating System. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, filcab, fjricci Reviewed By: kcc Subscribers: llvm-commits, kubamracek, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37193 llvm-svn: 311933
OpenPOWER on IntegriCloud