From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: Daniel Axtens <dja@axtens.net>, linuxppc-dev@lists.ozlabs.org
Cc: syzkaller@googlegroups.com, npiggin@gmail.com, dvyukov@google.com
Subject: Re: [PATCH v2 2/2] powerpc: Enable kcov
Date: Wed, 20 Feb 2019 15:47:27 +1100 [thread overview]
Message-ID: <0c122e1d-8f7f-cd5e-b7e5-5b859c2df4c5@au1.ibm.com> (raw)
In-Reply-To: <87o9772ih2.fsf@dja-thinkpad.axtens.net>
On 20/2/19 3:26 pm, Daniel Axtens wrote:
> I needed the following diff to get this booting on a T4240RDB:
>
> diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
> index 961f44eabb65..fbe9894d6305 100644
> --- a/arch/powerpc/kernel/Makefile
> +++ b/arch/powerpc/kernel/Makefile
> @@ -3,6 +3,10 @@
> # Makefile for the linux kernel.
> #
>
> +KCOV_INSTRUMENT_cputable.o := n
> +KCOV_INSTRUMENT_setup_64.o := n
> +KCOV_INSTRUMENT_paca.o := n
> +
> CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
>
> # Disable clang warning for using setjmp without setjmp.h header
> diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
> index f965fc33a8b7..0140e7e12c29 100644
> --- a/arch/powerpc/mm/Makefile
> +++ b/arch/powerpc/mm/Makefile
> @@ -5,6 +5,9 @@
>
> ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
>
> +KCOV_INSTRUMENT_tlb_nohash.o := n
> +KCOV_INSTRUMENT_fsl_booke_mmu.o := n
> +
> CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE)
>
> obj-y := fault.o mem.o pgtable.o mmap.o \
>
>
> The change to kernel/ is required to get the kernel to even begin to
> boot, and the change to mm/ is required to successfully set up SMP. I'm
> not sure preciesly why they cause issues.
Thanks for testing this - I'll roll this into v3.
>
> I was then able to run kcovtrace and the results seem to make sense. >
> Perhaps in the future some further stuff should be trimmed down to make
> the coverage results less noisy (restore_math is probably not telling us
> anything interesting, for example), but certainly this is a great start.
I think syzkaller (as the main kcov consumer) can probably cope...
>
> With those changes,
> Tested-by: Daniel Axtens <dja@axtens.net> # e6500
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
next prev parent reply other threads:[~2019-02-20 4:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 0:20 [PATCH v2 1/2] powerpc/64s: Fix logic when handling unknown CPU features Andrew Donnellan
2019-02-11 0:20 ` [PATCH v2 2/2] powerpc: Enable kcov Andrew Donnellan
2019-02-20 4:26 ` Daniel Axtens
2019-02-20 4:47 ` Andrew Donnellan [this message]
2019-02-22 9:47 ` [v2, 1/2] powerpc/64s: Fix logic when handling unknown CPU features Michael Ellerman
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=0c122e1d-8f7f-cd5e-b7e5-5b859c2df4c5@au1.ibm.com \
--to=andrew.donnellan@au1.ibm.com \
--cc=dja@axtens.net \
--cc=dvyukov@google.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=syzkaller@googlegroups.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).