All of lore.kernel.org
 help / color / mirror / Atom feed
From: jslaby@suse.cz (Jiri Slaby)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6] kernel: add kcov code coverage
Date: Tue, 2 Feb 2016 18:19:44 +0100	[thread overview]
Message-ID: <56B0E530.8090908@suse.cz> (raw)
In-Reply-To: <1453726850-49137-1-git-send-email-dvyukov@google.com>

On 01/25/2016, 02:00 PM, Dmitry Vyukov wrote:
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -136,6 +136,12 @@ _c_flags += $(if $(patsubst n%,, \
>  		$(CFLAGS_UBSAN))
>  endif
>  
> +ifeq ($(CONFIG_KCOV),y)
> +_c_flags += $(if $(patsubst n%,, \
> +	$(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)y), \
> +	$(CFLAGS_KCOV))

Now that KCOV does not inherit KASAN's "n"s, I see link errors in efi
lib with EFI_STUB:
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function
`efi_printk':
efi-stub-helper.c:(.text+0x13): undefined reference to
`__sanitizer_cov_trace_pc'
efi-stub-helper.c:(.text+0x31): undefined reference to
`__sanitizer_cov_trace_pc'
...

I fixed it by adding "KCOV_INSTRUMENT := n" to
  drivers/firmware/efi/libstub/Makefile

thanks,
-- 
js
suse labs

WARNING: multiple messages have this Message-ID (diff)
From: Jiri Slaby <jslaby@suse.cz>
To: Dmitry Vyukov <dvyukov@google.com>,
	syzkaller@googlegroups.com, vegard.nossum@oracle.com,
	catalin.marinas@arm.com, taviso@google.com, will.deacon@arm.com,
	linux-kernel@vger.kernel.org, quentin.casasnovas@oracle.com,
	kcc@google.com, edumazet@google.com, glider@google.com,
	keescook@google.com, bhelgaas@google.com, sasha.levin@oracle.com,
	akpm@linux-foundation.org, drysdale@google.com,
	linux-arm-kernel@lists.infradead.org, ard.biesheuvel@linaro.org,
	ryabinin.a.a@gmail.com, kirill@shutemov.name
Subject: Re: [PATCH v6] kernel: add kcov code coverage
Date: Tue, 2 Feb 2016 18:19:44 +0100	[thread overview]
Message-ID: <56B0E530.8090908@suse.cz> (raw)
In-Reply-To: <1453726850-49137-1-git-send-email-dvyukov@google.com>

On 01/25/2016, 02:00 PM, Dmitry Vyukov wrote:
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -136,6 +136,12 @@ _c_flags += $(if $(patsubst n%,, \
>  		$(CFLAGS_UBSAN))
>  endif
>  
> +ifeq ($(CONFIG_KCOV),y)
> +_c_flags += $(if $(patsubst n%,, \
> +	$(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)y), \
> +	$(CFLAGS_KCOV))

Now that KCOV does not inherit KASAN's "n"s, I see link errors in efi
lib with EFI_STUB:
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function
`efi_printk':
efi-stub-helper.c:(.text+0x13): undefined reference to
`__sanitizer_cov_trace_pc'
efi-stub-helper.c:(.text+0x31): undefined reference to
`__sanitizer_cov_trace_pc'
...

I fixed it by adding "KCOV_INSTRUMENT := n" to
  drivers/firmware/efi/libstub/Makefile

thanks,
-- 
js
suse labs

  parent reply	other threads:[~2016-02-02 17:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 13:00 [PATCH v6] kernel: add kcov code coverage Dmitry Vyukov
2016-01-25 13:00 ` Dmitry Vyukov
2016-01-25 13:03 ` Dmitry Vyukov
2016-01-25 13:03   ` Dmitry Vyukov
2016-01-25 15:38   ` Kirill A. Shutemov
2016-01-25 15:38     ` Kirill A. Shutemov
2016-01-25 13:53 ` kbuild test robot
2016-01-25 13:53   ` kbuild test robot
2016-01-28 12:30 ` Alexander Shishkin
2016-01-28 12:30   ` Alexander Shishkin
2016-02-02 16:02 ` Andrey Ryabinin
2016-02-02 16:02   ` Andrey Ryabinin
2016-02-04 15:07   ` Dmitry Vyukov
2016-02-04 15:07     ` Dmitry Vyukov
2016-02-04 15:19     ` Andrey Ryabinin
2016-02-04 15:19       ` Andrey Ryabinin
2016-02-02 17:19 ` Jiri Slaby [this message]
2016-02-02 17:19   ` Jiri Slaby
2016-02-04 15:07   ` Dmitry Vyukov
2016-02-04 15:07     ` 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=56B0E530.8090908@suse.cz \
    --to=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.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 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.