[all-commits] [llvm/llvm-project] 46cb8d: [TSAN] add support for riscv64 (#68735)

AdityaK via All-commits all-commits at lists.llvm.org
Thu Oct 12 16:03:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46cb8d9a325233ac11ed5e90367c43774294d87e
      https://github.com/llvm/llvm-project/commit/46cb8d9a325233ac11ed5e90367c43774294d87e
  Author: AdityaK <1894981+hiraditya at users.noreply.github.com>
  Date:   2023-10-12 (Thu, 12 Oct 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Linux.cpp
    M compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
    M compiler-rt/lib/sanitizer_common/sanitizer_platform.h
    M compiler-rt/lib/tsan/rtl/CMakeLists.txt
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
    M compiler-rt/lib/tsan/rtl/tsan_platform.h
    M compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
    M compiler-rt/lib/tsan/rtl/tsan_rtl.h
    A compiler-rt/lib/tsan/rtl/tsan_rtl_riscv64.S
    M compiler-rt/test/tsan/map32bit.cpp
    M compiler-rt/test/tsan/mmap_large.cpp
    M compiler-rt/test/tsan/test.h

  Log Message:
  -----------
  [TSAN] add support for riscv64 (#68735)

Implements for sv39 and sv48 VMA layout.

Userspace only has access to the bottom half of vma range. The top half
is used by kernel. There is no dedicated vsyscall or heap segment.
PIE program is allocated to start at TASK_SIZE/3*2. Maximum ASLR is
ARCH_MMAP_RND_BITS_MAX+PAGE_SHIFT=24+12=36 Loader, vdso and other
libraries are allocated below stack from the top.

Also change RestoreAddr to use 4 bits to accommodate MappingRiscv64_48

Reviewed by: MaskRay, dvyukov, asb, StephenFan, luismarques, jrtc27,
hiraditya, vitalybuka

Differential Revision: https://reviews.llvm.org/D145214

D145214 was reverted because one file was missing in the latest commit.
Luckily the file was there in the previous commit, probably the author
missed uploading that file with latest commit.

Co-authored-by: Alex Fan <alex.fan.q at gmail.com>




More information about the All-commits mailing list