|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
016e59bf |
| 05-Apr-2022 |
Alex Brachet <[email protected]> |
Revert "[Scudo] enabling anonymous named pages on Linux 5.17 and onwards."
This reverts commit 619499252307c520fd840a5f3c79ffa00eaf2264.
|
| #
61949925 |
| 05-Apr-2022 |
David Carlier <[email protected]> |
[Scudo] enabling anonymous named pages on Linux 5.17 and onwards.
Reviewers: vitalybuka
Reviewed-By: vitalybuka
Differential Revision: https://reviews.llvm.org/D122962
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
78e70cee |
| 01-Jul-2021 |
Vitaly Buka <[email protected]> |
[scudo] Remove false DCHECK
MTE Cache.store passes MAP_NOACCESS here.
Reviewed By: pcc, cryptoad
Differential Revision: https://reviews.llvm.org/D105266
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
| #
4458e8c4 |
| 28-May-2021 |
Vitaly Buka <[email protected]> |
Revert "[scudo] Check if MADV_DONTNEED zeroes memory"
This reverts commit d423509b8036c29bbf94dab192d12097555ce0f8.
We are going to use patched QEMU.
|
| #
eb69763a |
| 27-May-2021 |
Vitaly Buka <[email protected]> |
[NFC][scudo] Rename internal function
|
|
Revision tags: llvmorg-12.0.1-rc1 |
|
| #
18722834 |
| 24-May-2021 |
Kostya Kortchinsky <[email protected]> |
[scudo] Rework dieOnMapUnmapError
Said function had a few shortfalls: - didn't set an abort message on Android - was logged on several lines - didn't provide extra information like the size requeste
[scudo] Rework dieOnMapUnmapError
Said function had a few shortfalls: - didn't set an abort message on Android - was logged on several lines - didn't provide extra information like the size requested if OOM'ing
This improves the function to address those points.
Differential Revision: https://reviews.llvm.org/D103034
show more ...
|
| #
f7164c77 |
| 28-Apr-2021 |
Vitaly Buka <[email protected]> |
[NFC][scudo] Add reference to a QEMU bug
D101031 added workaround for the bug.
|
| #
337a024b |
| 25-Apr-2021 |
Vitaly Buka <[email protected]> |
[scudo][NFC] Fix cast warning
|
| #
d423509b |
| 22-Apr-2021 |
Vitaly Buka <[email protected]> |
[scudo] Check if MADV_DONTNEED zeroes memory
QEMU just ignores MADV_DONTNEED https://github.com/qemu/qemu/blob/b1cffefa1b163bce9aebc3416f562c1d3886eeaa/linux-user/syscall.c#L11941
Depends on D10099
[scudo] Check if MADV_DONTNEED zeroes memory
QEMU just ignores MADV_DONTNEED https://github.com/qemu/qemu/blob/b1cffefa1b163bce9aebc3416f562c1d3886eeaa/linux-user/syscall.c#L11941
Depends on D100998.
Differential Revision: https://reviews.llvm.org/D101031
show more ...
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
| #
3f71ce85 |
| 22-Dec-2020 |
Peter Collingbourne <[email protected]> |
scudo: Support memory tagging in the secondary allocator.
This patch enhances the secondary allocator to be able to detect buffer overflow, and (on hardware supporting memory tagging) use-after-free
scudo: Support memory tagging in the secondary allocator.
This patch enhances the secondary allocator to be able to detect buffer overflow, and (on hardware supporting memory tagging) use-after-free and buffer underflow.
Use-after-free detection is implemented by setting memory page protection to PROT_NONE on free. Because this must be done immediately rather than after the memory has been quarantined, we no longer use the combined allocator quarantine for secondary allocations. Instead, a quarantine has been added to the secondary allocator cache.
Buffer overflow detection is implemented by aligning the allocation to the right of the writable pages, so that any overflows will spill into the guard page to the right of the allocation, which will have PROT_NONE page protection. Because this would require the secondary allocator to produce a header at the correct position, the responsibility for ensuring chunk alignment has been moved to the secondary allocator.
Buffer underflow detection has been implemented on hardware supporting memory tagging by tagging the memory region between the start of the mapping and the start of the allocation with a non-zero tag. Due to the cost of pre-tagging secondary allocations and the memory bandwidth cost of tagged accesses, the allocation itself uses a tag of 0 and only the first four pages have memory tagging enabled.
This is a reland of commit 7a0da8894348 which was reverted in commit 9678b07e42ee. This reland includes the following changes:
- Fix the calculation of BlockSize which led to incorrect statistics returned by mallinfo(). - Add -Wno-pedantic to silence GCC warning. - Optionally add some slack at the end of secondary allocations to help work around buggy applications that read off the end of their allocation.
Differential Revision: https://reviews.llvm.org/D93731
show more ...
|
| #
9678b07e |
| 26-Feb-2021 |
Peter Collingbourne <[email protected]> |
Revert 7a0da8894348, "scudo: Support memory tagging in the secondary allocator."
We measured a 2.5 seconds (17.5%) regression in Android boot time performance with this change.
|
| #
7a0da889 |
| 22-Dec-2020 |
Peter Collingbourne <[email protected]> |
scudo: Support memory tagging in the secondary allocator.
This patch enhances the secondary allocator to be able to detect buffer overflow, and (on hardware supporting memory tagging) use-after-free
scudo: Support memory tagging in the secondary allocator.
This patch enhances the secondary allocator to be able to detect buffer overflow, and (on hardware supporting memory tagging) use-after-free and buffer underflow.
Use-after-free detection is implemented by setting memory page protection to PROT_NONE on free. Because this must be done immediately rather than after the memory has been quarantined, we no longer use the combined allocator quarantine for secondary allocations. Instead, a quarantine has been added to the secondary allocator cache.
Buffer overflow detection is implemented by aligning the allocation to the right of the writable pages, so that any overflows will spill into the guard page to the right of the allocation, which will have PROT_NONE page protection. Because this would require the secondary allocator to produce a header at the correct position, the responsibility for ensuring chunk alignment has been moved to the secondary allocator.
Buffer underflow detection has been implemented on hardware supporting memory tagging by tagging the memory region between the start of the mapping and the start of the allocation with a non-zero tag. Due to the cost of pre-tagging secondary allocations and the memory bandwidth cost of tagged accesses, the allocation itself uses a tag of 0 and only the first four pages have memory tagging enabled.
Differential Revision: https://reviews.llvm.org/D93731
show more ...
|
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
dfa40840 |
| 18-Dec-2020 |
Peter Collingbourne <[email protected]> |
scudo: Remove ANDROID_EXPERIMENTAL_MTE macro.
Kernel support for MTE has been released in Linux 5.10. This means that it is a stable API and we no longer need to make the support conditional on a ma
scudo: Remove ANDROID_EXPERIMENTAL_MTE macro.
Kernel support for MTE has been released in Linux 5.10. This means that it is a stable API and we no longer need to make the support conditional on a macro. We do need to provide conditional definitions of the new macros though in order to avoid a dependency on new kernel headers.
Differential Revision: https://reviews.llvm.org/D93513
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1 |
|
| #
1ef0e94d |
| 12-Oct-2020 |
Fangrui Song <[email protected]> |
[compiler-rt] Suppress -Wunused-result due to ::write when _FORTIFY_SOURCE>0 in glibc
Noticed by Peter Foley. In glibc, ::write is declared as __attribute__((__warn_unused_result__)) when __USE_FORT
[compiler-rt] Suppress -Wunused-result due to ::write when _FORTIFY_SOURCE>0 in glibc
Noticed by Peter Foley. In glibc, ::write is declared as __attribute__((__warn_unused_result__)) when __USE_FORTIFY_LEVEL is larger than 0.
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
| #
21d50019 |
| 28-Jan-2020 |
Peter Collingbourne <[email protected]> |
scudo: Add support for diagnosing memory errors when memory tagging is enabled.
Introduce a function __scudo_get_error_info() that may be called to interpret a crash resulting from a memory error, p
scudo: Add support for diagnosing memory errors when memory tagging is enabled.
Introduce a function __scudo_get_error_info() that may be called to interpret a crash resulting from a memory error, potentially in another process, given information extracted from the crashing process. The crash may be interpreted as a use-after-free, buffer overflow or buffer underflow.
Also introduce a feature to optionally record a stack trace for each allocation and deallocation. If this feature is enabled, a stack trace for the allocation and (if applicable) the deallocation will also be available via __scudo_get_error_info().
Differential Revision: https://reviews.llvm.org/D77283
show more ...
|
| #
15754acc |
| 13-Apr-2020 |
Kostya Kortchinsky <[email protected]> |
[scudo][standalone] Split logs on Android
Summary: The function used to log on Android will cut the message past a certain amount of characters, which mostly materializes when dumping the size class
[scudo][standalone] Split logs on Android
Summary: The function used to log on Android will cut the message past a certain amount of characters, which mostly materializes when dumping the size class map on OOM.
This change splits the log message at newline boundaries.
Reviewers: pcc, cferris, hctim, eugenis
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78018
show more ...
|
| #
a1f6ff26 |
| 28-Jan-2020 |
Kostya Kortchinsky <[email protected]> |
[scudo][standalone] Fix Android logging
Summary: Zygote & children's stderr is lost, so use Bionic's provided allocation free syslog function for `outputRaw`. Get rid of the mutex as it's not vital
[scudo][standalone] Fix Android logging
Summary: Zygote & children's stderr is lost, so use Bionic's provided allocation free syslog function for `outputRaw`. Get rid of the mutex as it's not vital and could cause issues with `fork`.
Reviewers: cferris, pcc, eugenis, hctim, morehouse
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73561
show more ...
|
| #
561fa844 |
| 20-Jan-2020 |
Kostya Kortchinsky <[email protected]> |
[scudo][standalone] Allow sched_getaffinity to fail
Summary: In some configuration, `sched_getaffinity` can fail. Some reasons for that being the lack of `CAP_SYS_NICE` capability or some syscall fi
[scudo][standalone] Allow sched_getaffinity to fail
Summary: In some configuration, `sched_getaffinity` can fail. Some reasons for that being the lack of `CAP_SYS_NICE` capability or some syscall filtering and so on.
This should not be fatal to the allocator, so in this situation, we will fallback to the `MaxTSDCount` value specified in the allocator configuration.
Reviewers: cferris, eugenis, hctim, morehouse, pcc
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73055
show more ...
|
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2 |
|
| #
c299d198 |
| 05-Dec-2019 |
Peter Collingbourne <[email protected]> |
scudo: Add initial memory tagging support.
When the hardware and operating system support the ARM Memory Tagging Extension, tag primary allocation granules with a random tag. The granules either sid
scudo: Add initial memory tagging support.
When the hardware and operating system support the ARM Memory Tagging Extension, tag primary allocation granules with a random tag. The granules either side of the allocation are tagged with tag 0, which is normally excluded from the set of tags that may be selected randomly. Memory is also retagged with a random tag when it is freed, and we opportunistically reuse the new tag when the block is reused to reduce overhead. This causes linear buffer overflows to be caught deterministically and non-linear buffer overflows and use-after-free to be caught probabilistically.
This feature is currently only enabled for the Android allocator and depends on an experimental Linux kernel branch available here: https://github.com/pcc/linux/tree/android-experimental-mte
All code that depends on the kernel branch is hidden behind a macro, ANDROID_EXPERIMENTAL_MTE. This is the same macro that is used by the Android platform and may only be defined in non-production configurations. When the userspace interface is finalized the code will be updated to use the stable interface and all #ifdef ANDROID_EXPERIMENTAL_MTE will be removed.
Differential Revision: https://reviews.llvm.org/D70762
show more ...
|
|
Revision tags: llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2 |
|
| #
8095449e |
| 12-Aug-2019 |
Kostya Kortchinsky <[email protected]> |
[scudo][standalone] Minor corrections
Summary: Few corrections with no functional change: - replacing `%zd` with `%zu` all around: the values are unsigned - prefer `MAP_ANONYMOUS` to `MAP_ANON` (it'
[scudo][standalone] Minor corrections
Summary: Few corrections with no functional change: - replacing `%zd` with `%zu` all around: the values are unsigned - prefer `MAP_ANONYMOUS` to `MAP_ANON` (it's deprecated) - remove the unused `enum LinkerInitialized` - mark a parameter as `UNUSED` in Fuchsia's `getRandom` - correct the casing of a variable and use `nullptr` instead of 0 for pointers in `list.h` - reorder some `typedef` to be consistent between `signed` and `unsigned`
Reviewers: eugenis, vitalybuka, morehouse, hctim
Reviewed By: vitalybuka, morehouse
Subscribers: delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D65660
llvm-svn: 368585
show more ...
|
| #
6d46ebef |
| 01-Aug-2019 |
Nico Weber <[email protected]> |
compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp
Like r367463, but for scudo/standalone.
llvm-svn: 367568
|