All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Drysdale <drysdale@google.com>,
	Kees Cook <keescook@google.com>,
	Quentin Casasnovas <quentin.casasnovas@oracle.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Tavis Ormandy <taviso@google.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	syzkaller <syzkaller@googlegroups.com>,
	Kostya Serebryany <kcc@google.com>,
	Alexander Potapenko <glider@google.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>
Subject: Re: [PATCH v2] kernel: add kcov code coverage
Date: Thu, 14 Jan 2016 14:49:57 +0200	[thread overview]
Message-ID: <20160114124957.GB28386@node.shutemov.name> (raw)
In-Reply-To: <CACT4Y+Z-4B_rnOmn_51a1WA6HxnVNex2ZHbeCyu-s_786wZ9gg@mail.gmail.com>

On Thu, Jan 14, 2016 at 01:21:27PM +0100, Dmitry Vyukov wrote:
> >> Alternatively, you can try to bulk disable instrumentation of
> >> everything related to boot process (by adding KCOV_INSTRUMENT := n to
> >> the Makefile). Most likely it is due to instrumentation. If it helps,
> >> try to bisect the the guilty files.
> >
> > Okay, I'll try.
> 
> 
> I've tried with exactly your gcc revision and your config and VM boots fine...
> 
> For me it prints 4 CPUs:
> [    0.193348] smpboot: Total of 4 processors activated
> so it is probably fine :)
> 
> I am almost sure that the root cause is kcov instrumentation is some
> inappropriate place. I've fixed such symptoms several times by
> disabling instrumentation in various places.

Okay, I found it. The patch below helps.

But I wounder how safe this thing is. :-/

Looks like -fsanitize-coverage=trace-pc doesn't play well when we change
calling convention for the compilation unit, as we do for hweight.o.
See CONFIG_ARCH_HWEIGHT_CFLAGS.

What else should we expect from GCC in this mode?

diff --git a/lib/Makefile b/lib/Makefile
index 58043870dbd2..56171482f99f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -15,6 +15,7 @@ KCOV_INSTRUMENT_rbtree.o := n
 KCOV_INSTRUMENT_list_debug.o := n
 KCOV_INSTRUMENT_debugobjects.o := n
 KCOV_INSTRUMENT_dynamic_debug.o := n
+KCOV_INSTRUMENT_hweight.o := n
 
 lib-y := ctype.o string.o vsprintf.o cmdline.o \
         rbtree.o radix-tree.o dump_stack.o timerqueue.o\
-- 
 Kirill A. Shutemov

  parent reply	other threads:[~2016-01-14 12:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 12:48 [PATCH v2] kernel: add kcov code coverage Dmitry Vyukov
2016-01-13 22:31 ` kbuild test robot
2016-01-14  9:03 ` Kirill A. Shutemov
2016-01-14  9:10   ` Dmitry Vyukov
2016-01-14  9:23     ` Kirill A. Shutemov
2016-01-14 12:21       ` Dmitry Vyukov
2016-01-14 12:35         ` Kirill A. Shutemov
2016-01-14 12:49         ` Kirill A. Shutemov [this message]
2016-01-14 14:24           ` Dmitry Vyukov
2016-01-14 10:50 ` Andrey Ryabinin
2016-01-14 14:30   ` Dmitry Vyukov
2016-01-15 13:05     ` Andrey Ryabinin
2016-01-15 13:05       ` Andrey Ryabinin
2016-01-15 13:42       ` Will Deacon
2016-01-15 13:42         ` Will Deacon
2016-01-15 14:07       ` Dmitry Vyukov
2016-01-15 14:07         ` Dmitry Vyukov
2016-01-18 13:34         ` Andrey Ryabinin
2016-01-18 13:34           ` Andrey Ryabinin
2016-01-18 19:31           ` Dmitry Vyukov
2016-01-18 19:31             ` Dmitry Vyukov
2016-01-18 14:13         ` Mark Rutland
2016-01-18 14:13           ` Mark Rutland
2016-01-18 19:44           ` Dmitry Vyukov
2016-01-18 19:44             ` Dmitry Vyukov
2016-01-18 20:09             ` Dmitry Vyukov
2016-01-18 20:09               ` Dmitry Vyukov
2016-01-22 11:55               ` Mark Rutland
2016-01-22 11:55                 ` Mark Rutland
2016-01-22 12:15                 ` Dmitry Vyukov
2016-01-22 12:15                   ` Dmitry Vyukov
2016-01-22 12:52                   ` Mark Rutland
2016-01-22 12:52                     ` Mark Rutland

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=20160114124957.GB28386@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=drysdale@google.com \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=glider@google.com \
    --cc=kcc@google.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quentin.casasnovas@oracle.com \
    --cc=ryabinin.a.a@gmail.com \
    --cc=sasha.levin@oracle.com \
    --cc=syzkaller@googlegroups.com \
    --cc=taviso@google.com \
    --cc=vegard.nossum@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.