pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Reset vm mapping to the Linux/FreeBSD one
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Oct 13 22:05:00 2017 +0200
Changeset: 4c27914a27507743f7dcc3a61bd5aebda20be748
Modified Files:
compiler-rt-netbsd/distinfo
Removed Files:
compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform.h
Log Message:
compiler-rt-netbsd: Reset vm mapping to the Linux/FreeBSD one
NetBSD with disabled ASLR can reuse the Linux/FreeBSD mapping.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4c27914a27507743f7dcc3a61bd5aebda20be748
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 1 -
.../patches/patch-lib_tsan_rtl_tsan__platform.h | 107 ---------------------
2 files changed, 108 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index f4b32606c7..31829c6057 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -5,7 +5,6 @@ SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = eaffd9f8f2621ad465b5c734a764bdff0
SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = f5825b7081758e07e36dbd47a887f31a20912a83
SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = 25cba9ff9d61910bb74d500e515da083af4e6cb7
SHA1 (patch-lib_tsan_go_buildgo.sh) = fe64b3389bbf6ae2ddf187df3e0600b2f817f51d
-SHA1 (patch-lib_tsan_rtl_tsan__platform.h) = 9ba65b81bb95bdf3b949da801cb9b97bf94174c4
SHA1 (patch-lib_tsan_rtl_tsan__platform__linux.cc) = 23744bd656f0dcee425821491bcaa723f26130a3
SHA1 (patch-lib_tsan_rtl_tsan__platform__posix.cc) = ddf48d91100e681f09b7303a37936ac8cd7f775a
SHA1 (patch-lib_tsan_rtl_tsan__rtl__amd64.S) = 95591667c23372ceb72334b2ceae800d32574ac6
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform.h b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform.h
deleted file mode 100644
index 57e1b80b9d..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform.h
+++ /dev/null
@@ -1,107 +0,0 @@
-$NetBSD$
-
---- lib/tsan/rtl/tsan_platform.h.orig 2017-10-05 14:37:53.556451290 +0000
-+++ lib/tsan/rtl/tsan_platform.h
-@@ -26,7 +26,68 @@ namespace __tsan {
-
- #if !SANITIZER_GO
-
--#if defined(__x86_64__)
-+#if SANITIZER_NETBSD
-+/*
-+C/C++ on NetBSD/x86_64
-+
-+On exec() kernel maps program segments (.text, .data, .rodata...), stack and
-+interpreter (if a dynamic loadable executable). Interpeter (usually ld.elf_so)
-+maps into the vmmap shared libraries on the heap.
-+
-+The program segments are loaded on the beginning (alternatively there were
-+pointed out by the ELF metadata) on the virtual address space, and the stack is
-+mapped on the end of virtual address space available for user programs
-+(7f7f ffff f000).
-+
-+AMD64 stack grows downwards and has prereserved 128GB of memory.
-+There comes barrier and linker under the stack.
-+
-+Heap starts after another gap and goes downwards.
-+
-+PIE programs have randomized (ASLR) main binary segments.
-+
-+The position of stack, linker, heap is by default randomized by ASLR.
-+The NetBSD version of ASLR can shift a mapping by 0-64MB.
-+
-+The first page (address 0x0) cannot be mapped (vm.user_va0_disable)
-+in normal circumsances.
-+
-+0000 0000 1000 - 0080 0000 0000: main binary
-+ : -
-+0100 0000 0000 - 2000 0000 0000: shadow
-+ : -
-+3000 0000 0000 - 4000 0000 0000: metainfo (memory blocks and sync objects)
-+ : -
-+6000 0000 0000 - 6200 0000 0000: traces
-+ : -
-+7000 0000 0000 - 7c00 0000 0000: heap and dynamically loaded shared libraries
-+ : -
-+7e00 0000 0000 - 7f7f ffff f000: main thread stack and ld.so_elf
-+*/
-+struct Mapping {
-+ static const uptr kLoAppMemBeg = 0x000000000000ull;
-+ static const uptr kLoAppMemEnd = 0x008000000000ull;
-+
-+ static const uptr kShadowBeg = 0x010000000000ull;
-+ static const uptr kShadowEnd = 0x200000000000ull;
-+
-+ static const uptr kMetaShadowBeg = 0x300000000000ull;
-+ static const uptr kMetaShadowEnd = 0x340000000000ull;
-+
-+ static const uptr kTraceMemBeg = 0x600000000000ull;
-+ static const uptr kTraceMemEnd = 0x620000000000ull;
-+
-+ static const uptr kHeapMemBeg = 0x780000000000ull;
-+ static const uptr kHeapMemEnd = 0x7c0000000000ull;
-+
-+ static const uptr kHiAppMemBeg = 0x7e0000000000ull;
-+ static const uptr kHiAppMemEnd = 0x7f7ffffff000ull;
-+
-+ static const uptr kAppMemMsk = 0x780000000000ull;
-+ static const uptr kAppMemXor = 0x040000000000ull;
-+};
-+
-+#elif defined(__x86_64__)
- /*
- C/C++ on linux/x86_64 and freebsd/x86_64
- 0000 0000 1000 - 0080 0000 0000: main binary and/or MAP_32BIT mappings (512GB)
-@@ -387,7 +448,9 @@ enum MappingType {
- MAPPING_META_SHADOW_END,
- MAPPING_TRACE_BEG,
- MAPPING_TRACE_END,
-+#if !SANITIZER_NETBSD
- MAPPING_VDSO_BEG,
-+#endif
- };
-
- template<typename Mapping, int Type>
-@@ -404,7 +467,9 @@ uptr MappingImpl(void) {
- case MAPPING_HI_APP_END: return Mapping::kHiAppMemEnd;
- case MAPPING_HEAP_BEG: return Mapping::kHeapMemBeg;
- case MAPPING_HEAP_END: return Mapping::kHeapMemEnd;
-+#if !SANITIZER_NETBSD
- case MAPPING_VDSO_BEG: return Mapping::kVdsoBeg;
-+#endif
- #else
- case MAPPING_APP_BEG: return Mapping::kAppMemBeg;
- case MAPPING_APP_END: return Mapping::kAppMemEnd;
-@@ -478,10 +543,12 @@ uptr HiAppMemEnd(void) {
- return MappingArchImpl<MAPPING_HI_APP_END>();
- }
-
-+#if !SANITIZER_NETBSD
- ALWAYS_INLINE
- uptr VdsoBeg(void) {
- return MappingArchImpl<MAPPING_VDSO_BEG>();
- }
-+#endif
-
- #else
-
Home |
Main Index |
Thread Index |
Old Index