Android support for SafeStack.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 23 Sep 2015 01:03:51 +0000 (01:03 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 23 Sep 2015 01:03:51 +0000 (01:03 +0000)
commitc7b6dc0535d6f0cffeddced49bb6b2d11f721901
tree41a404f95682c37644b07296e9a548e7a3ba5a1e
parent8641a304d18e8a1dfcc52bad174d79426edfe793
Android support for SafeStack.

Add two new ways of accessing the unsafe stack pointer:

* At a fixed offset from the thread TLS base. This is very similar to
  StackProtector cookies, but we plan to extend it to other backends
  (ARM in particular) soon. Bionic-side implementation here:
  https://android-review.googlesource.com/170988.
* Via a function call, as a fallback for platforms that provide
  neither a fixed TLS slot, nor a reasonable TLS implementation (i.e.
  not emutls).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248357 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
include/llvm/Transforms/Instrumentation.h
lib/CodeGen/Passes.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.h
lib/Transforms/Instrumentation/SafeStack.cpp
test/Transforms/SafeStack/abi.ll [new file with mode: 0644]