summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Summary: update macro for OFF_T so that sanitizer works on AARCH64.Lirong Yuan2020-01-101-1/+1
| | | | | | | | | | | | Reviewers: vitalybuka, eugenis, MaskRay Reviewed By: eugenis, MaskRay Subscribers: MaskRay, kristof.beyls, #sanitizers, llvm-commits, jkz, scw Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D72367
* [Sanitizers] Add support for RISC-V 64-bitSam Elliott2019-10-231-1/+9
| | | | | | | | | | | | | | | | | Summary: This has been tested with gcc trunk on openSUSE Tumbleweed on the HiFive Unleashed. Patch by Andreas Schwab (schwab) Reviewers: luismarques Reviewed By: luismarques Subscribers: mhorne, emaste, luismarques, asb, mgorny, fedor.sergeev, simoncook, kito-cheng, shiva0217, rogfer01, rkruppe, lenary, s.egerton, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D66870
* Revert [Sanitizers] Add support for RISC-V 64-bitSam Elliott2019-10-171-9/+1
| | | | | | This reverts r375132 (git commit 00bbe990c5d4472d5413479a539b3d6edbb3ca7a) llvm-svn: 375136
* [Sanitizers] Add support for RISC-V 64-bitSam Elliott2019-10-171-1/+9
| | | | | | | | | | | | | | | | | | | Summary: This has been tested with gcc trunk on openSUSE Tumbleweed on the HiFive Unleashed. Patch by Andreas Schwab (schwab) Reviewers: luismarques Reviewed By: luismarques Subscribers: mhorne, emaste, luismarques, asb, mgorny, fedor.sergeev, simoncook, kito-cheng, shiva0217, rogfer01, rkruppe, lenary, s.egerton, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D66870 llvm-svn: 375132
* Reland "[ASan] Do not misrepresent high value address dereferences as null ↵Julian Lettner2019-10-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dereferences" Updated: Removed offending TODO comment. Dereferences with addresses above the 48-bit hardware addressable range produce "invalid instruction" (instead of "invalid access") hardware exceptions (there is no hardware address decoding logic for those bits), and the address provided by this exception is the address of the instruction (not the faulting address). The kernel maps the "invalid instruction" to SEGV, but fails to provide the real fault address. Because of this ASan lies and says that those cases are null dereferences. This downgrades the severity of a found bug in terms of security. In the ASan signal handler, we can not provide the real faulting address, but at least we can try not to lie. rdar://50366151 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D68676 > llvm-svn: 374265 llvm-svn: 374384
* Revert "[ASan] Do not misrepresent high value address dereferences as null ↵Russell Gallop2019-10-101-6/+0
| | | | | | | | | | dereferences" As it was breaking bots running sanitizer lint check This reverts r374265 (git b577efe4567f1f6a711ad36e1d17280dd1c4f009) llvm-svn: 374308
* [ASan] Do not misrepresent high value address dereferences as null dereferencesJulian Lettner2019-10-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | Dereferences with addresses above the 48-bit hardware addressable range produce "invalid instruction" (instead of "invalid access") hardware exceptions (there is no hardware address decoding logic for those bits), and the address provided by this exception is the address of the instruction (not the faulting address). The kernel maps the "invalid instruction" to SEGV, but fails to provide the real fault address. Because of this ASan lies and says that those cases are null dereferences. This downgrades the severity of a found bug in terms of security. In the ASan signal handler, we can not provide the real faulting address, but at least we can try not to lie. rdar://50366151 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D68676 llvm-svn: 374265
* Add getauxval() compat for NetBSDKamil Rytarowski2019-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: getauxval() is not available on NetBSD and there is no a direct equivalent. Add a function that implements the same semantics with NetBSD internals. Reorder the GetPageSize() functions to prefer the sysctl approach for NetBSD. It no longer makes a difference which approach is better. Avoid changing conditional code path. Reviewers: vitalybuka, dvyukov, mgorny, joerg Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67329 llvm-svn: 371758
* Fixing buildbot due to style.David Carlier2019-08-221-2/+4
| | | | llvm-svn: 369711
* [Sanitizer] checks ASLR on FreeBSDDavid Carlier2019-08-221-0/+27
| | | | | | | | | | | | - Especially MemorySanitizer fails if those sysctl configs are enabled. Reviewers: vitalybuka, emaste, dim Reviewed By: dim Differential Revision: https://reviews.llvm.org/D66582 llvm-svn: 369708
* compiler-rt: Rename .cc file in lib/sanitizer_common to .cppNico Weber2019-07-311-0/+2106
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
OpenPOWER on IntegriCloud