aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-08-14 18:54:12 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-08-14 18:54:12 +0000
commitfdb1a6c341c0e289f3f900cdab87f831262c0e93 (patch)
treee35e2e89168b0bc5fac51bb9df0541a1201213ce /include/llvm/Transforms
parent35d5e9044c580c843eb6e825d87816619e6d7f8f (diff)
downloadexternal_llvm-fdb1a6c341c0e289f3f900cdab87f831262c0e93.zip
external_llvm-fdb1a6c341c0e289f3f900cdab87f831262c0e93.tar.gz
external_llvm-fdb1a6c341c0e289f3f900cdab87f831262c0e93.tar.bz2
DataFlowSanitizer: greylist is now ABI list.
This replaces the old incomplete greylist functionality with an ABI list, which can provide more detailed information about the ABI and semantics of specific functions. The pass treats every function in the "uninstrumented" category in the ABI list file as conforming to the "native" (i.e. unsanitized) ABI. Unless the ABI list contains additional categories for those functions, a call to one of those functions will produce a warning message, as the labelling behaviour of the function is unknown. The other supported categories are "functional", "discard" and "custom". - "discard" -- This function does not write to (user-accessible) memory, and its return value is unlabelled. - "functional" -- This function does not write to (user-accessible) memory, and the label of its return value is the union of the label of its arguments. - "custom" -- Instead of calling the function, a custom wrapper __dfsw_F is called, where F is the name of the function. This function may wrap the original function or provide its own implementation. Differential Revision: http://llvm-reviews.chandlerc.com/D1345 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Instrumentation.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Transforms/Instrumentation.h b/include/llvm/Transforms/Instrumentation.h
index ecc470b..a5cac00 100644
--- a/include/llvm/Transforms/Instrumentation.h
+++ b/include/llvm/Transforms/Instrumentation.h
@@ -89,12 +89,14 @@ FunctionPass *createMemorySanitizerPass(bool TrackOrigins = false,
FunctionPass *createThreadSanitizerPass(StringRef BlacklistFile = StringRef());
// Insert DataFlowSanitizer (dynamic data flow analysis) instrumentation
-ModulePass *createDataFlowSanitizerPass(void *(*getArgTLS)() = 0,
+ModulePass *createDataFlowSanitizerPass(StringRef ABIListFile = StringRef(),
+ void *(*getArgTLS)() = 0,
void *(*getRetValTLS)() = 0);
#if defined(__GNUC__) && defined(__linux__)
-inline ModulePass *createDataFlowSanitizerPassForJIT() {
- return createDataFlowSanitizerPass(getDFSanArgTLSPtrForJIT,
+inline ModulePass *createDataFlowSanitizerPassForJIT(StringRef ABIListFile =
+ StringRef()) {
+ return createDataFlowSanitizerPass(ABIListFile, getDFSanArgTLSPtrForJIT,
getDFSanRetValTLSPtrForJIT);
}
#endif