From: Andrey Konovalov <andreyknvl@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: andrey.konovalov@linux.dev, Marco Elver <elver@google.com>,
Alexander Potapenko <glider@google.com>,
kasan-dev@googlegroups.com,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>
Subject: Re: [PATCH] kcov: improve documentation
Date: Tue, 28 Feb 2023 21:01:01 +0100 [thread overview]
Message-ID: <CA+fCnZdn+3LuzDP0f=kc9Pgt6i63cQbXieP1gJRYOS8WnVJKQA@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+Z4GvK-XCbrLp8cuH-xHYsCdh1f0948ZgkU2D0apfGG5w@mail.gmail.com>
On Tue, Feb 28, 2023 at 10:37 AM Dmitry Vyukov <dvyukov@google.com> wrote:
>
> On Mon, 27 Feb 2023 at 18:17, <andrey.konovalov@linux.dev> wrote:
> >
> > From: Andrey Konovalov <andreyknvl@google.com>
> >
> > Improve KCOV documentation:
> >
> > - Use KCOV instead of kcov, as the former is more widely-used.
> >
> > - Mention Clang in compiler requirements.
> >
> > - Use ``annotations`` for inline code.
> >
> > - Rework remote coverage collection documentation for better clarity.
> >
> > - Various smaller changes.
> >
> > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> > ---
> > Documentation/dev-tools/kcov.rst | 169 +++++++++++++++++++------------
> > 1 file changed, 102 insertions(+), 67 deletions(-)
> >
> > diff --git a/Documentation/dev-tools/kcov.rst b/Documentation/dev-tools/kcov.rst
> > index d83c9ab49427..a113a03a475f 100644
> > --- a/Documentation/dev-tools/kcov.rst
> > +++ b/Documentation/dev-tools/kcov.rst
> > @@ -1,42 +1,50 @@
> > -kcov: code coverage for fuzzing
> > +KCOV: code coverage for fuzzing
> > ===============================
> >
> > -kcov exposes kernel code coverage information in a form suitable for coverage-
> > -guided fuzzing (randomized testing). Coverage data of a running kernel is
> > -exported via the "kcov" debugfs file. Coverage collection is enabled on a task
> > -basis, and thus it can capture precise coverage of a single system call.
> > +KCOV collects and exposes kernel code coverage information in a form suitable
> > +for coverage-guided fuzzing. Coverage data of a running kernel is exported via
> > +the ``kcov`` debugfs file. Coverage collection is enabled on a task basis, and
> > +thus KCOV can capture precise coverage of a single system call.
> >
> > -Note that kcov does not aim to collect as much coverage as possible. It aims
> > -to collect more or less stable coverage that is function of syscall inputs.
> > -To achieve this goal it does not collect coverage in soft/hard interrupts
> > -and instrumentation of some inherently non-deterministic parts of kernel is
> > -disabled (e.g. scheduler, locking).
> > +Note that KCOV does not aim to collect as much coverage as possible. It aims
> > +to collect more or less stable coverage that is a function of syscall inputs.
> > +To achieve this goal, it does not collect coverage in soft/hard interrupts
> > +(unless remove coverage collection is enabled, see below) and from some
> > +inherently non-deterministic parts of the kernel (e.g. scheduler, locking).
> >
> > -kcov is also able to collect comparison operands from the instrumented code
> > -(this feature currently requires that the kernel is compiled with clang).
> > +Besides collecting code coverage, KCOV can also collect comparison operands.
> > +See the "Comparison operands collection" section for details.
> > +
> > +Besides collecting coverage data from syscall handlers, KCOV can also collect
> > +coverage for annotated parts of the kernel executing in background kernel
> > +tasks or soft interrupts. See the "Remote coverage collection" section for
> > +details.
> >
> > Prerequisites
> > -------------
> >
> > -Configure the kernel with::
> > +KCOV relies on compiler instrumentation and requires GCC 6.1.0 or later
> > +or any Clang version supported by the kernel.
> >
> > - CONFIG_KCOV=y
> > +Collecting comparison operands is only supported with Clang.
>
> Are you sure?
> I see -fsanitize-coverage=trace-cmp in gcc sources and man page.
Right, supported too starting with version 8.
Will fix in v2.
> Otherwise looks good to me.
I'll add your Reviewed-by to v2 then.
Thank you!
prev parent reply other threads:[~2023-02-28 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 17:17 andrey.konovalov
2023-02-28 9:37 ` Dmitry Vyukov
2023-02-28 20:01 ` Andrey Konovalov [this message]
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='CA+fCnZdn+3LuzDP0f=kc9Pgt6i63cQbXieP1gJRYOS8WnVJKQA@mail.gmail.com' \
--to=andreyknvl@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrey.konovalov@linux.dev \
--cc=andreyknvl@google.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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