[PATCH] D98875: [HWASan] Use page aliasing on x86_64.

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 18 09:54:11 PDT 2021


morehouse created this revision.
morehouse added reviewers: vitalybuka, eugenis.
Herald added subscribers: pengfei, jfb, hiraditya.
morehouse requested review of this revision.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98875

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98875.331594.patch
Type: text/x-patch
Size: 35676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/82293370/attachment.bin>


More information about the llvm-commits mailing list