hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag.
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 17 Jun 2019 23:39:51 +0000 (23:39 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 17 Jun 2019 23:39:51 +0000 (23:39 +0000)
commitd57f7cc15e22888773d3ad663160ccc66fc7656b
treeb46f30314494834bbba6f1a974441113d8703531
parentfb9ce100d19be130d004d03088ccd4af295f3435
hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag.

This saves roughly 32 bytes of instructions per function with stack objects
and causes us to preserve enough information that we can recover the original
tags of all stack variables.

Now that stack tags are deterministic, we no longer need to pass
-hwasan-generate-tags-with-calls during check-hwasan. This also means that
the new stack tag generation mechanism is exercised by check-hwasan.

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

llvm-svn: 363636
compiler-rt/lib/hwasan/hwasan_thread.cpp
compiler-rt/test/hwasan/TestCases/random-align-right.c
compiler-rt/test/hwasan/TestCases/stack-history-length.c
compiler-rt/test/hwasan/lit.cfg
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/test/Instrumentation/HWAddressSanitizer/dbg-declare-tag-offset.ll
llvm/test/Instrumentation/HWAddressSanitizer/prologue.ll