DataFlowSanitizer: greylist is now ABI list.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 14 Aug 2013 18:54:12 +0000 (18:54 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 14 Aug 2013 18:54:12 +0000 (18:54 +0000)
commitfdb1a6c341c0e289f3f900cdab87f831262c0e93
treee35e2e89168b0bc5fac51bb9df0541a1201213ce
parent35d5e9044c580c843eb6e825d87816619e6d7f8f
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
include/llvm/Transforms/Instrumentation.h
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
test/Instrumentation/DataFlowSanitizer/abilist.ll [new file with mode: 0644]
test/Instrumentation/DataFlowSanitizer/abilist.ll.txt [new file with mode: 0644]