[all-commits] [llvm/llvm-project] 62ed00: [dfsan] Re-exec with no ASLR if memory layout is i...
Thurston Dang via All-commits
all-commits at lists.llvm.org
Wed Mar 20 11:05:13 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62ed009ce218897d7707144de54fa1e2beec59dc
https://github.com/llvm/llvm-project/commit/62ed009ce218897d7707144de54fa1e2beec59dc
Author: Thurston Dang <thurston at google.com>
Date: 2024-03-20 (Wed, 20 Mar 2024)
Changed paths:
M compiler-rt/lib/dfsan/dfsan.cpp
M compiler-rt/lib/dfsan/dfsan_allocator.cpp
M compiler-rt/lib/dfsan/dfsan_platform.h
Log Message:
-----------
[dfsan] Re-exec with no ASLR if memory layout is incompatible on Linux (#85674)
DFSan's shadow mappings are incompatible with 32 bits of ASLR entropy
('sudo sysctl vm.mmap_rnd_bits=32; ninja check-dfsan') and it is
difficult to fix this via increasing the size of the shadow mappings,
due to the overhead of shadow memory. This patch works around the issue
by detecting if the memory layout is incompatible, and if so,
re-exec'ing without ASLR.
DFSan and MSan share copy-pasted shadow memory code, hence this
workaround is ported from MSan:
- "[msan] Re-exec with no ASLR if memory layout is incompatible on
Linux"
(https://github.com/llvm/llvm-project/commit/58f7251820b14c93168726a24816d8a094599be5)
- "[msan] Add 'MappingDesc::ALLOCATOR' type and check it is available"
(https://github.com/llvm/llvm-project/commit/af2bf86a372cacf5f536bae06e2f2d3886eefb7b)
(which in turn are inspired by TSan: "Re-exec TSan with no ASLR if
memory layout is incompatible on Linux"
(https://github.com/llvm/llvm-project/commit/0784b1eefa36d4acbb0dacd2d18796e26313b6c5
))
aeubanks had remarked in
https://github.com/llvm/llvm-project/pull/85142#issuecomment-2004442883
that this issue occurs in Chromium:
https://ci.chromium.org/ui/p/chromium/builders/try/linux_upload_clang/5066/overview
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list