| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Like r367463, but for interception/tests and safestack.
llvm-svn: 367560
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: pcc, eugenis, vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Subscribers: llvm-commits, jfb, #sanitizers
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D57863
llvm-svn: 353482
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
3rd party sysconf interceptor may crash if it's called before unsafe_stack_setup
However pageSize is not useful here. mmap should round up on it's own, SFS_CHECK can be removed.
Reviewers: eugenis, vlad.tsyrklevich
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D57924
llvm-svn: 353481
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
From runtime side looks it's OK to RoundUpTo to needed alignment as buffer is
going to be RoundUpTo to page size anyway.
Reviewers: eugenis, pcc
Subscribers: #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D57866
llvm-svn: 353475
|
|
|
|
|
|
| |
This function can be already intercepted by instrumented code.
llvm-svn: 351783
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: krytarowski, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56937
llvm-svn: 351607
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
SafeStack needs just few functions from there, but sanitizer_common
introduces conflicts with other runtimes, e.g. SCUDO.
Reviewers: eugenis, kcc, cryptoad
Subscribers: mgorny, krytarowski, fedor.sergeev, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D56886
llvm-svn: 351506
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: eugenis
Subscribers: jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D56888
llvm-svn: 351503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The Linux/BSD system call interfaces report errors differently, use the
internal_iserror() function to correctly check errors on either.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: delcypher, llvm-commits, #sanitizers, krytarowski, kcc, devnexen
Differential Revision: https://reviews.llvm.org/D51368
llvm-svn: 340856
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When deallocating thread stacks, we use one thread's unsafe stack size
to deallocate another thread's unsafe stack; however, the two sizes may
differ. Record an unsafe stack's size in the thread stack linked list.
Reviewers: pcc, eugenis
Reviewed By: eugenis
Subscribers: delcypher, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D51016
llvm-svn: 340308
|
|
|
|
|
|
|
|
|
|
| |
This relands commit r339405 (reverted in commit r339408.) The original
revert was due to tests failing on a darwin buildbot; however, after
looking at the affected code more I realized that the Darwin safestack
support has always been broken and disabled it in r339719. This relands
the original commit.
llvm-svn: 339723
|
|
|
|
|
|
|
|
|
| |
This reverts commit r339405, it's failing on Darwin buildbots because
it doesn't seem to have a tgkill/thr_kill2 interface. It has a
__pthread_kill() syscall, but that relies on having a handle to the
thread's port which is not equivalent to it's tid.
llvm-svn: 339408
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
glibc can call SafeStack instrumented code even after the last pthread
data destructor has run. Delay cleaning-up unsafe stacks for threads
until the thread is dead by having future threads clean-up prior threads
stacks.
Reviewers: pcc, eugenis
Reviewed By: eugenis
Subscribers: cryptoad, eugenis, kubamracek, delcypher, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D50406
llvm-svn: 339405
|
|
|
|
|
|
|
| |
Duplicate __get_unsafe_stack_bottom instead of using an alias for
platforms that don't suppport it like Darwin.
llvm-svn: 337044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Introduce built-ins to read the unsafe stack top and bottom. The unsafe
stack top is required to implement garbage collection scanning for
Oilpan. Currently there is already a built-in 'get_unsafe_stack_start'
to read the bottom of the unsafe stack, but I chose to duplicate this
API because 'start' is ambiguous (e.g. Oilpan uses WTF::GetStackStart to
read the safe stack top.)
Reviewers: pcc
Reviewed By: pcc
Subscribers: llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D49152
llvm-svn: 337037
|
|
|
|
|
|
|
|
|
| |
Interceptors initialization may try to allocate memory and to call not
initialized allocator.
It's similar to r326025 for CFI.
llvm-svn: 333329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
make check-safestack:
-- Testing: 8 tests, 8 threads --
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 0.44s
Expected Passes : 7
Unsupported Tests : 1
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, vitalybuka, kcc, fjricci, filcab
Reviewed By: vitalybuka
Subscribers: mgorny, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D36542
llvm-svn: 310646
|
|
|
|
|
|
|
|
|
|
|
|
| |
The definitions in sanitizer_common may conflict with definitions from system headers because:
The runtime includes the system headers after the project headers (as per LLVM coding guidelines).
lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT
This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry.
Differential Revision: https://reviews.llvm.org/D21947
llvm-svn: 281657
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables the safestack for aarch64. The frontend already have
it enabled on all supported architectures and no adjustment is required
in llvm.
The compiler-rt adjustments are basically add on the cmake configuration
to enable the tests and fix the pagesize debug check by getting its
value at runtime (since aarch64 has multiple pagesize depending of
kernel configuration).
llvm-svn: 255345
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Trim spaces.
- Use nullptr in place of 0 for pointer variables.
- Use '!p' in place of 'p == 0' for null pointer checks.
- Add blank lines to separate function definitions.
- Add 'extern "C"' or 'namespace foo' comments after the appropriate
closing brackets
This is a continuation of work from 409b7b82. The focus here is on the
various sanitizers (not sanitizer_common, as before).
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13225
llvm-svn: 248966
|
|
|
|
| |
llvm-svn: 240564
|
|
|
|
|
|
| |
Should fix the FreeBSD build.
llvm-svn: 240555
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch clarifies the TODO note at the top of safestack.cc and brings
it more in sync with what we (the CPI team) actually plan to work on in
the future.
Patch by Volodymyr Kuznetsov!
Differential Revision: http://reviews.llvm.org/D10600
llvm-svn: 240473
|
|
compiler-rt runtime support library
This patch adds runtime support for the Safe Stack protection to compiler-rt
(see http://reviews.llvm.org/D6094 for the detailed description of the
Safe Stack).
This patch is our implementation of the safe stack on top of compiler-rt. The
patch adds basic runtime support for the safe stack to compiler-rt that
manages unsafe stack allocation/deallocation for each thread.
Original patch by Volodymyr Kuznetsov and others at the Dependable Systems
Lab at EPFL; updates and upstreaming by myself.
Differential Revision: http://reviews.llvm.org/D6096
llvm-svn: 239763
|