Commit Graph

31 Commits

Author SHA1 Message Date
Matt Morehouse 005991a3fe [DFSan] Remove dfsan_use_fast16labels from abilist.
Its implementation was scrapped in the final fast16labels
instrumentation patch.
2020-07-29 23:18:07 +00:00
Matt Morehouse e2d0b44a7c [DFSan] Add efficient fast16labels instrumentation mode.
Adds the -fast-16-labels flag, which enables efficient instrumentation
for DFSan when the user needs <=16 labels.  The instrumentation
eliminates most branches and most calls to __dfsan_union or
__dfsan_union_load.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D84371
2020-07-29 18:58:47 +00:00
Vitaly Buka d059d01c23 [dfsan] Remove realloc from done_abilist.txt
Summary:
Currently, realloc is marked as "discard" in done_abilist.txt. As discussed in PR#45583, this is probably not the expected behavior; a custom wrapper seems to be required. Since this wrapper has not been implemented yet, realloc should not be in the done_abilist.txt file so that a warning is displayed when it is called.

Reviewers: kcc, pcc, vitalybuka

Reviewed By: vitalybuka

Subscribers: #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D78379
2020-05-05 22:32:45 -07:00
Kostya Serebryany 6b936d88a4 [dfsan] Introduce dfsan_flush().
Summary:
dfsan_flush() allows to restart tain tracking from scratch in the same process.
The primary purpose right now is to allow more efficient data flow tracing
for DFT fuzzing: https://github.com/google/oss-fuzz/issues/1632

Reviewers: pcc

Reviewed By: pcc

Subscribers: delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 363321
2019-06-13 20:11:06 +00:00
Kostya Serebryany 73634e4037 [dfsan] add one more sanitizer-coverage hook to the whitelist
llvm-svn: 331908
2018-05-09 18:35:09 +00:00
Kostya Serebryany 356e584d91 [dfsan] update the abilist for the sanitizer coverage; also remove the fuzz target from this list
llvm-svn: 331710
2018-05-08 01:52:40 +00:00
Kostya Serebryany 9c50876120 [sanitizer-coverage] remove stale code (old coverage); compiler-rt part
llvm-svn: 304318
2017-05-31 18:26:32 +00:00
Kostya Serebryany 1838561dfe [sanitizer-coverage] remove more unused code
llvm-svn: 300780
2017-04-19 23:05:53 +00:00
Kostya Serebryany d32bc3ee38 [sanitizer-coverage] remove run-time support for -fsanitize-coverage=indirect-calls
llvm-svn: 300775
2017-04-19 22:24:03 +00:00
Kostya Serebryany b45905c5a9 [sanitizer-coverage] remove run-time support for the deprecated -fsanitize-coverage=8bit-counters
llvm-svn: 300745
2017-04-19 20:17:41 +00:00
Kostya Serebryany 385b973ad3 [sanitizer-coverage] add __sanitizer_cov_trace_cmp[1248] to the sanitizer-coverage interface
llvm-svn: 279026
2016-08-18 01:23:27 +00:00
Kostya Serebryany 823e85c37e [libFuzzer/DFSan] add more __sanitizer callbacks to dfsan blacklist
llvm-svn: 244082
2015-08-05 18:20:15 +00:00
Kostya Serebryany 4fca6e8063 [libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and sanitizer coverage. Also fix pedantic warnings
llvm-svn: 243721
2015-07-31 01:07:12 +00:00
Kostya Serebryany c520f17c6f [dfsan/libFuzzer] correctly ignore sanitizer coverage calls in dfsan
llvm-svn: 243362
2015-07-28 00:57:07 +00:00
Kostya Serebryany 05425a88cd [dfsan] ignore more __sanitizer callbacks
llvm-svn: 238085
2015-05-23 01:56:39 +00:00
Kostya Serebryany a86398e3fd Add api_list entries for the dfsan-based fuzzer
Summary: Add api_list entries for the dfsan-based fuzzer

Test Plan: covered by check-fuzzer

Reviewers: pcc

Reviewed By: pcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9538

llvm-svn: 236657
2015-05-06 22:41:34 +00:00
Peter Collingbourne 4da39395b0 [dfsan] Add libgo functions to ABI list.
llvm-svn: 221363
2014-11-05 17:21:08 +00:00
Lorenzo Martignoni 60ebffc12f Custom wrappers for DFSanitizing sprintf & snprintf.
Differential Revision: http://reviews.llvm.org/D5561

llvm-svn: 219293
2014-10-08 10:01:42 +00:00
Peter Collingbourne 16f2f18105 Add user-defined callback on write() calls.
Add dfsan_set_write_callback(), which sets a callback to be invoked when
a write() call is invoked within DFSan instrumented code.

Patch by Sam Kerner!

Differential Revision: http://reviews.llvm.org/D3268

llvm-svn: 207131
2014-04-24 17:42:16 +00:00
Peter Collingbourne 5d167dae7d Add function to get the number of DFSan labels allocated.
Expose the number of DFSan labels allocated by adding function dfsan_get_label_count().

Patch by Sam Kerner!

Differential Revision: http://llvm-reviews.chandlerc.com/D3109

llvm-svn: 204854
2014-03-26 21:09:53 +00:00
Lorenzo Martignoni f073541819 [DFSan] New custom wrappers
Added the following custom wrappers:
  strstr
  strrchr
  memchr
  nanosleep
  socketpair

Tweaked a couple of existing wrappers: if a wrapper returns a pointers derived
from an input pointer, then return the label of the input pointer

Sorted tests invocation

Differential Revision: D2354

llvm-svn: 197601
2013-12-18 19:25:34 +00:00
Lorenzo Martignoni 65550a5dd1 [DFSan] Extend the ABI list to discard new glibc functions
Differential Revision: http://llvm-reviews.chandlerc.com/D2291

llvm-svn: 196389
2013-12-04 16:53:10 +00:00
Lorenzo Martignoni 895454e1e4 Implement a bunch of custom glibc wrappers & corresponding tests
llvm-svn: 195749
2013-11-26 11:45:58 +00:00
Peter Collingbourne f09d5d03fd Revert r195381, "Implement a bunch of custom glibc wrappers & corresponding tests."
It broke a buildbot.

llvm-svn: 195392
2013-11-21 23:48:19 +00:00
Peter Collingbourne 0a14a71061 Implement a bunch of custom glibc wrappers & corresponding tests.
- Introduce several new custom glibc wrappers
- Implement some of the not yet implemented wrappers
- Refactor and extend the tests
- Add script to make sure all declare custom glibc wrappers are implemented & tested.

Patch by Lorenzo Martignoni!

Differential Revision: http://llvm-reviews.chandlerc.com/D2234

llvm-svn: 195381
2013-11-21 23:18:03 +00:00
Peter Collingbourne 01b337dc2d [dfsan] Tweaks for the ABI list
- Add a bunch of glibc functions to the ABI list
- Group similar functions in the ABI

Patch by Lorenzo Martignoni!

Differential Revision: http://llvm-reviews.chandlerc.com/D2185

llvm-svn: 195110
2013-11-19 06:33:13 +00:00
Peter Collingbourne cdec0a8ad2 [dfsan] Add a few easy functions to the ABI list.
llvm-svn: 190653
2013-09-13 01:38:56 +00:00
Peter Collingbourne 187a169603 [dfsan] Add custom function for dl_iterate_phdr.
Differential Revision: http://llvm-reviews.chandlerc.com/D1505

llvm-svn: 189503
2013-08-28 20:18:25 +00:00
Peter Collingbourne 3e5524d6c5 [dfsan] Add custom function for pthread_create.
Differential Revision: http://llvm-reviews.chandlerc.com/D1504

llvm-svn: 189502
2013-08-28 20:18:22 +00:00
Peter Collingbourne 12b0809eb1 [dfsan] Initial set of custom functions and interceptors for libc.
Differential Revision: http://llvm-reviews.chandlerc.com/D1397

llvm-svn: 188490
2013-08-15 21:18:53 +00:00
Peter Collingbourne 0e51eda83b [dfsan] Runtime support for ABI list functionality; can now run integration tests with args ABI.
Differential Revision: http://llvm-reviews.chandlerc.com/D1351

llvm-svn: 188401
2013-08-14 18:54:06 +00:00