[PATCH] D42874: [hwasan] Add a paragraph on stack instrumentation.
Evgenii Stepanov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 2 17:10:34 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324163: [hwasan] Add a paragraph on stack instrumentation. (authored by eugenis, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D42874?vs=132708&id=132711#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42874
Files:
cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst
Index: cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst
===================================================================
--- cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst
+++ cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst
@@ -77,11 +77,18 @@
Stack
-----
-Special compiler instrumentation is required to align the local variables
-by N, tag the memory and the pointers.
+Stack frames are instrumented by aligning all non-promotable allocas
+by `N` and tagging stack memory in function prologue and epilogue.
+
+Tags for different allocas in one function are **not** generated
+independently; doing that in a function with `M` allocas would require
+maintaining `M` live stack pointers, significantly increasing register
+pressure. Instead we generate a single base tag value in the prologue,
+and build the tag for alloca number `M` as `ReTag(BaseTag, M)`, where
+ReTag can be as simple as exclusive-or with constant `M`.
+
Stack instrumentation is expected to be a major source of overhead,
but could be optional.
-TODO: details.
Globals
-------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42874.132711.patch
Type: text/x-patch
Size: 1091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180203/c253477f/attachment-0001.bin>
More information about the cfe-commits
mailing list