linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org
Cc: tchibo@google.com, Dmitry Vyukov <dvyukov@google.com>
Subject: [PATCH 0/3] kcov: support comparison operands collection
Date: Wed, 30 Aug 2017 18:23:28 +0200	[thread overview]
Message-ID: <cover.1504109849.git.dvyukov@google.com> (raw)

Enables kcov to collect comparison operands from instrumented code.
This is done by using Clang's -fsanitize=trace-cmp instrumentation
(currently not available for GCC).

The comparison operands help a lot in fuzz testing. E.g. they are
used in syzkaller to cover the interiors of conditional statements
with way less attempts and thus make previously unreachable code
reachable.

To allow separate collection of coverage and comparison operands two
different work modes are implemented. Mode selection is now done via
a KCOV_ENABLE ioctl call with corresponding argument value.

Clang instrumentation:
https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-data-flow
Syzkaller:
https://github.com/google/syzkaller

Victor Chibotaru (3):
  kcov: support comparison operands collection
  Makefile: support flag -fsanitizer-coverage=trace-cmp
  kcov: update documentation

 Documentation/dev-tools/kcov.rst |  94 +++++++++++++++++-
 Makefile                         |   5 +-
 include/linux/kcov.h             |  12 ++-
 include/uapi/linux/kcov.h        |  32 ++++++
 kernel/kcov.c                    | 203 ++++++++++++++++++++++++++++++++-------
 lib/Kconfig.debug                |   8 ++
 scripts/Makefile.kcov            |   6 ++
 scripts/Makefile.lib             |   6 ++
 8 files changed, 322 insertions(+), 44 deletions(-)
 create mode 100644 scripts/Makefile.kcov

-- 
2.14.1.581.gf28d330327-goog

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2017-08-30 16:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 16:23 Dmitry Vyukov [this message]
2017-08-30 16:23 ` [PATCH 1/3] kcov: support comparison operands collection Dmitry Vyukov
2017-08-30 18:23   ` Mark Rutland
2017-08-30 19:04     ` Alexander Potapenko
2017-08-30 19:08     ` Dmitry Vyukov
2017-08-31  9:31       ` Mark Rutland
2017-09-12 17:41       ` Dmitry Vyukov
2017-08-31 13:27   ` Andrey Konovalov
     [not found]   ` <CAPZ9YJZUPYs8nbwG9aO1uCfr7vPY7PNr1WPpvOxP8d+vkMiDJw@mail.gmail.com>
2017-09-12 17:41     ` Dmitry Vyukov
2017-08-30 16:23 ` [PATCH 2/3] Makefile: support flag -fsanitizer-coverage=trace-cmp Dmitry Vyukov
2017-08-30 16:23 ` [PATCH 3/3] kcov: update documentation Dmitry Vyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1504109849.git.dvyukov@google.com \
    --to=dvyukov@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=tchibo@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).