[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-25 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314171: Allow specifying sanitizers in blacklists (authored by vlad.tsyrklevich). Repository: rL LLVM https://reviews.llvm.org/D37925 Files: cfe/trunk/docs/ControlFlowIntegrity.rst cfe/trunk/docs/

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-21 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Basic/XRayLists.cpp:29 // whether it's treated as a "never" instrument function. - if (AlwaysInstrument->inSection("fun", FunctionName, "arg1")) + if (AlwaysInstrument->inSection("xray_always_instrument", "fun", FunctionName, +

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-21 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: lib/AST/Decl.cpp:3953 ReasonToReject = 5; // is standard layout. - else if (Blacklist.isBlacklistedLocation(getLocation(), "field-padding")) + else if (Blacklist.isBlacklistedLocation(ASanMask, getLocation(), +

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-21 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 116213. vlad.tsyrklevich marked 5 inline comments as done. vlad.tsyrklevich added a comment. - sanitizerCompile -> createSanitizerSections - ASanMask -> AsanMask and fix another bug relating to ANDing with LangOpts.Sanitize.Mask https://reviews.llv

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-20 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a subscriber: dberris. eugenis added inline comments. Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:39 + // Initialize SanitizerSections. + void sanitizerCompile(); + "compile" in this method name is confusing. It's used in the base c

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-19 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich marked an inline comment as done. vlad.tsyrklevich added inline comments. Comment at: docs/SanitizerSpecialCaseList.rst:57 + +Sections are regular expressions written in square brackets that denote which +sanitizer the following entries apply to. For example, ``[

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-19 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115849. vlad.tsyrklevich added a comment. - Refactor to make compile() not virtual again - Refactor a confusing use of ASanMask into individual uses of SanitizerKind::{Address,KernelAddress} - 'Sections' -> 'Section names' https://reviews.llvm.org/

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-18 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: docs/SanitizerSpecialCaseList.rst:57 + +Sections are regular expressions written in square brackets that denote which +sanitizer the following entries apply to. For example, ``[address]`` specifies Section names are regu

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-18 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115751. vlad.tsyrklevich added a comment. Update for SectionsMap refactor in LLVM https://reviews.llvm.org/D37925 Files: docs/ControlFlowIntegrity.rst docs/SanitizerSpecialCaseList.rst include/clang/Basic/SanitizerBlacklist.h include/clang/

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-18 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115703. vlad.tsyrklevich added a comment. Update documentation to mention sections in the blacklist documentation and in the CFI documentation (where it's most useful) https://reviews.llvm.org/D37925 Files: docs/ControlFlowIntegrity.rst docs/S

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115528. vlad.tsyrklevich added a comment. Address @eugenis' comments https://reviews.llvm.org/D37925 Files: include/clang/Basic/SanitizerBlacklist.h include/clang/Basic/SanitizerSpecialCaseList.h lib/AST/Decl.cpp lib/Basic/CMakeLists.txt

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:33 + + bool inSection(SanitizerMask Mask, StringRef Prefix, StringRef Query, + StringRef Category = StringRef()) const; eugenis wrote: > Please add

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:33 + + bool inSection(SanitizerMask Mask, StringRef Prefix, StringRef Query, + StringRef Category = StringRef()) const; Please add a comment on the meaning

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115509. vlad.tsyrklevich added a comment. Run clang-format. https://reviews.llvm.org/D37925 Files: include/clang/Basic/SanitizerBlacklist.h include/clang/Basic/SanitizerSpecialCaseList.h lib/AST/Decl.cpp lib/Basic/CMakeLists.txt lib/Basic

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Not included in this change: - Updating the sanitizer documentation to use section headers. It's worth doing for the CFI documentation to let people know they can break down blacklist entries by CFI mode, but is it worth pushing users to specify '[address]', '

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. Herald added a subscriber: mgorny. This is the follow-up patch to https://reviews.llvm.org/D37924. This change refactors clang to use the the newly added section headers in SpecialCaseList to specify which sanitizers blacklists entries should apply to, like