[all-commits] [llvm/llvm-project] 96a416: [HWASan] Use page aliasing on x86_64.

Matt Morehouse via All-commits all-commits at lists.llvm.org
Thu Mar 25 07:04:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96a4167b4c7e7e43d11b98f30bed84e4a626281a
      https://github.com/llvm/llvm-project/commit/96a4167b4c7e7e43d11b98f30bed84e4a626281a
  Author: Matt Morehouse <mascasa at google.com>
  Date:   2021-03-25 (Thu, 25 Mar 2021)

  Changed paths:
    M compiler-rt/lib/hwasan/hwasan.h
    M compiler-rt/lib/hwasan/hwasan_allocator.cpp
    M compiler-rt/lib/hwasan/hwasan_allocator.h
    M compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp
    M compiler-rt/lib/hwasan/hwasan_flags.h
    M compiler-rt/lib/hwasan/hwasan_interceptors.cpp
    M compiler-rt/lib/hwasan/hwasan_linux.cpp
    M compiler-rt/lib/hwasan/hwasan_mapping.h
    M compiler-rt/lib/hwasan/hwasan_memintrinsics.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_common.h
    M compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cpp
    M compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
    M compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cpp
    M compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c
    M compiler-rt/test/hwasan/TestCases/Linux/reuse-threads.cpp
    A compiler-rt/test/hwasan/TestCases/Linux/utils.h
    M compiler-rt/test/hwasan/TestCases/Linux/vfork.c
    M compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cpp
    M compiler-rt/test/hwasan/TestCases/allocator_returns_null.cpp
    M compiler-rt/test/hwasan/TestCases/heap-buffer-overflow.c
    M compiler-rt/test/hwasan/TestCases/hwasan-print-shadow.cpp
    M compiler-rt/test/hwasan/TestCases/malloc_fill.cpp
    M compiler-rt/test/hwasan/TestCases/many-threads-uaf.c
    M compiler-rt/test/hwasan/TestCases/mem-intrinsics.c
    M compiler-rt/test/hwasan/TestCases/set-error-report-callback.cpp
    M compiler-rt/test/hwasan/TestCases/sizes.cpp
    M compiler-rt/test/hwasan/TestCases/tail-magic.c
    M compiler-rt/test/hwasan/TestCases/use-after-free.c
    R compiler-rt/test/hwasan/TestCases/utils.h
    M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    M llvm/test/Instrumentation/HWAddressSanitizer/X86/atomic.ll
    M llvm/test/Instrumentation/HWAddressSanitizer/X86/basic.ll
    M llvm/test/Instrumentation/HWAddressSanitizer/X86/kernel.ll
    M llvm/test/Instrumentation/HWAddressSanitizer/X86/with-calls.ll

  Log Message:
  -----------
  [HWASan] Use page aliasing on x86_64.

Userspace page aliasing allows us to use middle pointer bits for tags
without untagging them before syscalls or accesses.  This should enable
easier experimentation with HWASan on x86_64 platforms.

Currently stack, global, and secondary heap tagging are unsupported.
Only primary heap allocations get tagged.

Note that aliasing mode will not work properly in the presence of
fork(), since heap memory will be shared between the parent and child
processes.  This mode is non-ideal; we expect Intel LAM to enable full
HWASan support on x86_64 in the future.

Reviewed By: vitalybuka, eugenis

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




More information about the All-commits mailing list