]> granicus.if.org Git - llvm/commit
Add section headers to SpecialCaseLists
authorVlad Tsyrklevich <vlad@tsyrklevich.net>
Mon, 25 Sep 2017 22:11:11 +0000 (22:11 +0000)
committerVlad Tsyrklevich <vlad@tsyrklevich.net>
Mon, 25 Sep 2017 22:11:11 +0000 (22:11 +0000)
commit1e4d340840dfad6145ef16ef223c554b65d7c922
tree558db5e85df8f1ce37f96b3958e4f252dfc68fae
parent6e7d96de4f84f9809544eb5129a0a31274f84de3
Add section headers to SpecialCaseLists

Summary:
Sanitizer blacklist entries currently apply to all sanitizers--there
is no way to specify that an entry should only apply to a specific
sanitizer. This is important for Control Flow Integrity since there are
several different CFI modes that can be enabled at once. For maximum
security, CFI blacklist entries should be scoped to only the specific
CFI mode(s) that entry applies to.

Adding section headers to SpecialCaseLists allows users to specify more
information about list entries, like sanitizer names or other metadata,
like so:

  [section1]
  fun:*fun1*
  [section2|section3]
  fun:*fun23*

The section headers are regular expressions. For backwards compatbility,
blacklist entries entered before a section header are put into the '[*]'
section so that blacklists without sections retain the same behavior.

SpecialCaseList has been modified to also accept a section name when
matching against the blacklist. It has also been modified so the
follow-up change to clang can define a derived class that allows
matching sections by SectionMask instead of by string.

Reviewers: pcc, kcc, eugenis, vsk

Reviewed By: eugenis, vsk

Subscribers: vitalybuka, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314170 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/SpecialCaseList.h
lib/Support/SpecialCaseList.cpp
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
tools/llvm-cov/CoverageFilters.cpp
tools/sancov/sancov.cc
unittests/Support/SpecialCaseListTest.cpp