* ✗ Ro.CI.BAT: failure for drm/i915: Enable fine-grained kcov instrumentation
2016-08-03 19:38 [PATCH] drm/i915: Enable fine-grained kcov instrumentation Chris Wilson
@ 2016-08-04 5:30 ` Patchwork
2016-08-04 6:12 ` [PATCH] " Joonas Lahtinen
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2016-08-04 5:30 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Enable fine-grained kcov instrumentation
URL : https://patchwork.freedesktop.org/series/10621/
State : failure
== Summary ==
Applying: drm/i915: Enable fine-grained kcov instrumentation
fatal: sha1 information is lacking or useless (drivers/gpu/drm/i915/Makefile).
error: could not build fake ancestor
Patch failed at 0001 drm/i915: Enable fine-grained kcov instrumentation
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
2016-08-03 19:38 [PATCH] drm/i915: Enable fine-grained kcov instrumentation Chris Wilson
2016-08-04 5:30 ` ✗ Ro.CI.BAT: failure for " Patchwork
@ 2016-08-04 6:12 ` Joonas Lahtinen
2016-08-04 6:30 ` Chris Wilson
2016-08-04 7:12 ` Jani Nikula
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Joonas Lahtinen @ 2016-08-04 6:12 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On ke, 2016-08-03 at 20:38 +0100, Chris Wilson wrote:
> In the next merge, we can build support for kcov at the individual file,
> or driver level. This is useful to filter out the noise when doing
> coverage test, i.e. we do get edges through code outside of i915.ko.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Umm, is not KCOV enabled by selecting KCOV and then instrumentation is
only disabled on select objects? "KCOV_INSTRUMENT_foo.o := n"?
> ---
> drivers/gpu/drm/i915/Kconfig.debug | 12 ++++++++++++
> drivers/gpu/drm/i915/Makefile | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index cee87bfd10c4..eb38270d0ecd 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -42,3 +42,15 @@ config DRM_I915_DEBUG_GEM
>
> If in doubt, say "N".
>
> +config DRM_I915_KCOV
> + bool "Generate fine-grained code coverage (for kcov)"
> + default n
> + select KCOV
> + help
> + Enable instrumentation of i915.ko to generate coverage via kcov
> + (/sys/kernel/debug/kcov). This allows coverage driven fuzzing,
> + such as AFL, to be used and focused on the driver.
> +
> + Recommended for driver developers only.
> +
> + If in doubt, say "N".
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 0afe7b3cad07..2f4bbaca5b60 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -3,6 +3,7 @@
> # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
> +subdir-ccflags-$(CONFIG_DRM_I915_KCOV) := $(CFLAGS_KCOV)
> subdir-ccflags-y += \
> $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
>
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
2016-08-04 6:12 ` [PATCH] " Joonas Lahtinen
@ 2016-08-04 6:30 ` Chris Wilson
2016-08-04 11:49 ` Joonas Lahtinen
0 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2016-08-04 6:30 UTC (permalink / raw)
To: Joonas Lahtinen; +Cc: intel-gfx
On Thu, Aug 04, 2016 at 09:12:07AM +0300, Joonas Lahtinen wrote:
> On ke, 2016-08-03 at 20:38 +0100, Chris Wilson wrote:
> > In the next merge, we can build support for kcov at the individual file,
> > or driver level. This is useful to filter out the noise when doing
> > coverage test, i.e. we do get edges through code outside of i915.ko.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Umm, is not KCOV enabled by selecting KCOV and then instrumentation is
> only disabled on select objects? "KCOV_INSTRUMENT_foo.o := n"?
commit a4691deabf284a601149a067525759939cc563b2
Author: Vegard Nossum <vegard.nossum@oracle.com>
Date: Tue Aug 2 14:07:30 2016 -0700
kcov: allow more fine-grained coverage instrumentation
For more targeted fuzzing, it's better to disable kernel-wide
instrumentation and instead enable it on a per-subsystem basis. This
follows the pattern of UBSAN and allows you to compile in the kcov
driver without instrumenting the whole kernel.
To instrument a part of the kernel, you can use either
# for a single file in the current directory
KCOV_INSTRUMENT_filename.o := y
or
# for all the files in the current directory (excluding subdirectories)
KCOV_INSTRUMENT := y
or
# (same as above)
ccflags-y += $(CFLAGS_KCOV)
or
# for all the files in the current directory (including subdirectories)
subdir-ccflags-y += $(CFLAGS_KCOV)
The commit itself adds KCOV_INSTRUMENT_ALL config target to enable
kernel-wide coverage, with KCOV then just enabling the debug interface.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
2016-08-04 6:30 ` Chris Wilson
@ 2016-08-04 11:49 ` Joonas Lahtinen
2016-08-04 11:52 ` Chris Wilson
0 siblings, 1 reply; 9+ messages in thread
From: Joonas Lahtinen @ 2016-08-04 11:49 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On to, 2016-08-04 at 07:30 +0100, Chris Wilson wrote:
> On Thu, Aug 04, 2016 at 09:12:07AM +0300, Joonas Lahtinen wrote:
> >
> > On ke, 2016-08-03 at 20:38 +0100, Chris Wilson wrote:
> > >
> > > In the next merge, we can build support for kcov at the individual file,
> > > or driver level. This is useful to filter out the noise when doing
> > > coverage test, i.e. we do get edges through code outside of i915.ko.
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Umm, is not KCOV enabled by selecting KCOV and then instrumentation is
> > only disabled on select objects? "KCOV_INSTRUMENT_foo.o := n"?
> commit a4691deabf284a601149a067525759939cc563b2
> Author: Vegard Nossum <vegard.nossum@oracle.com>
> Date: Tue Aug 2 14:07:30 2016 -0700
>
> kcov: allow more fine-grained coverage instrumentation
>
> For more targeted fuzzing, it's better to disable kernel-wide
> instrumentation and instead enable it on a per-subsystem basis. This
> follows the pattern of UBSAN and allows you to compile in the kcov
> driver without instrumenting the whole kernel.
>
> To instrument a part of the kernel, you can use either
>
> # for a single file in the current directory
> KCOV_INSTRUMENT_filename.o := y
>
> or
>
> # for all the files in the current directory (excluding subdirectories)
> KCOV_INSTRUMENT := y
>
> or
>
> # (same as above)
> ccflags-y += $(CFLAGS_KCOV)
>
> or
>
> # for all the files in the current directory (including subdirectories)
> subdir-ccflags-y += $(CFLAGS_KCOV)
>
>
> The commit itself adds KCOV_INSTRUMENT_ALL config target to enable
> kernel-wide coverage, with KCOV then just enabling the debug interface.
Could reference the patch in commit message if you especially want this
reviewed upfront. I see it could be merged after we get the commit to
our tree, too.
Regards, Joonas
> -Chris
>
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
2016-08-04 11:49 ` Joonas Lahtinen
@ 2016-08-04 11:52 ` Chris Wilson
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2016-08-04 11:52 UTC (permalink / raw)
To: Joonas Lahtinen; +Cc: intel-gfx
On Thu, Aug 04, 2016 at 02:49:17PM +0300, Joonas Lahtinen wrote:
> On to, 2016-08-04 at 07:30 +0100, Chris Wilson wrote:
> > On Thu, Aug 04, 2016 at 09:12:07AM +0300, Joonas Lahtinen wrote:
> > >
> > > On ke, 2016-08-03 at 20:38 +0100, Chris Wilson wrote:
> > > >
> > > > In the next merge, we can build support for kcov at the individual file,
> > > > or driver level. This is useful to filter out the noise when doing
> > > > coverage test, i.e. we do get edges through code outside of i915.ko.
> > > >
> > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Umm, is not KCOV enabled by selecting KCOV and then instrumentation is
> > > only disabled on select objects? "KCOV_INSTRUMENT_foo.o := n"?
> > commit a4691deabf284a601149a067525759939cc563b2
> > Author: Vegard Nossum <vegard.nossum@oracle.com>
> > Date: Tue Aug 2 14:07:30 2016 -0700
> >
> > kcov: allow more fine-grained coverage instrumentation
> >
> > For more targeted fuzzing, it's better to disable kernel-wide
> > instrumentation and instead enable it on a per-subsystem basis. This
> > follows the pattern of UBSAN and allows you to compile in the kcov
> > driver without instrumenting the whole kernel.
> >
> > To instrument a part of the kernel, you can use either
> >
> > # for a single file in the current directory
> > KCOV_INSTRUMENT_filename.o := y
> >
> > or
> >
> > # for all the files in the current directory (excluding subdirectories)
> > KCOV_INSTRUMENT := y
> >
> > or
> >
> > # (same as above)
> > ccflags-y += $(CFLAGS_KCOV)
> >
> > or
> >
> > # for all the files in the current directory (including subdirectories)
> > subdir-ccflags-y += $(CFLAGS_KCOV)
> >
> >
> > The commit itself adds KCOV_INSTRUMENT_ALL config target to enable
> > kernel-wide coverage, with KCOV then just enabling the debug interface.
>
> Could reference the patch in commit message if you especially want this
> reviewed upfront. I see it could be merged after we get the commit to
> our tree, too.
Not expecting anything before we get our backmerge. Just found it
interesting when going over the delta from Linus.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
2016-08-03 19:38 [PATCH] drm/i915: Enable fine-grained kcov instrumentation Chris Wilson
2016-08-04 5:30 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-04 6:12 ` [PATCH] " Joonas Lahtinen
@ 2016-08-04 7:12 ` Jani Nikula
2017-07-24 14:50 ` Chris Wilson
2017-07-24 14:50 ` Chris Wilson
4 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-08-04 7:12 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Wed, 03 Aug 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> In the next merge, we can build support for kcov at the individual file,
> or driver level. This is useful to filter out the noise when doing
> coverage test, i.e. we do get edges through code outside of i915.ko.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/Kconfig.debug | 12 ++++++++++++
> drivers/gpu/drm/i915/Makefile | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index cee87bfd10c4..eb38270d0ecd 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -42,3 +42,15 @@ config DRM_I915_DEBUG_GEM
>
> If in doubt, say "N".
>
> +config DRM_I915_KCOV
> + bool "Generate fine-grained code coverage (for kcov)"
> + default n
> + select KCOV
depends on KCOV?
BR,
Jani
> + help
> + Enable instrumentation of i915.ko to generate coverage via kcov
> + (/sys/kernel/debug/kcov). This allows coverage driven fuzzing,
> + such as AFL, to be used and focused on the driver.
> +
> + Recommended for driver developers only.
> +
> + If in doubt, say "N".
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 0afe7b3cad07..2f4bbaca5b60 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -3,6 +3,7 @@
> # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
> +subdir-ccflags-$(CONFIG_DRM_I915_KCOV) := $(CFLAGS_KCOV)
> subdir-ccflags-y += \
> $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
2016-08-03 19:38 [PATCH] drm/i915: Enable fine-grained kcov instrumentation Chris Wilson
` (2 preceding siblings ...)
2016-08-04 7:12 ` Jani Nikula
@ 2017-07-24 14:50 ` Chris Wilson
2017-07-24 14:50 ` Chris Wilson
4 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-07-24 14:50 UTC (permalink / raw)
To: intel-gfx
Quoting Chris Wilson (2016-08-03 20:38:53)
> In the next merge, we can build support for kcov at the individual file,
Since a4691deabf28 ("kcov: allow more fine-grained coverage instrumentation"),
> or driver level. This is useful to filter out the noise when doing
> coverage test, i.e. we do get edges through code outside of i915.ko.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/Kconfig.debug | 12 ++++++++++++
> drivers/gpu/drm/i915/Makefile | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index cee87bfd10c4..eb38270d0ecd 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -42,3 +42,15 @@ config DRM_I915_DEBUG_GEM
>
> If in doubt, say "N".
>
> +config DRM_I915_KCOV
> + bool "Generate fine-grained code coverage (for kcov)"
> + default n
> + select KCOV
> + help
> + Enable instrumentation of i915.ko to generate coverage via kcov
> + (/sys/kernel/debug/kcov). This allows coverage driven fuzzing,
> + such as AFL, to be used and focused on the driver.
> +
> + Recommended for driver developers only.
> +
> + If in doubt, say "N".
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 0afe7b3cad07..2f4bbaca5b60 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -3,6 +3,7 @@
> # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
> +subdir-ccflags-$(CONFIG_DRM_I915_KCOV) := $(CFLAGS_KCOV)
> subdir-ccflags-y += \
> $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
>
> --
> 2.8.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
2016-08-03 19:38 [PATCH] drm/i915: Enable fine-grained kcov instrumentation Chris Wilson
` (3 preceding siblings ...)
2017-07-24 14:50 ` Chris Wilson
@ 2017-07-24 14:50 ` Chris Wilson
4 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-07-24 14:50 UTC (permalink / raw)
To: intel-gfx
Quoting Chris Wilson (2016-08-03 20:38:53)
> In the next merge, we can build support for kcov at the individual file,
> or driver level. This is useful to filter out the noise when doing
> coverage test, i.e. we do get edges through code outside of i915.ko.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/Kconfig.debug | 12 ++++++++++++
> drivers/gpu/drm/i915/Makefile | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index cee87bfd10c4..eb38270d0ecd 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -42,3 +42,15 @@ config DRM_I915_DEBUG_GEM
>
> If in doubt, say "N".
>
> +config DRM_I915_KCOV
> + bool "Generate fine-grained code coverage (for kcov)"
> + default n
> + select KCOV
> + help
> + Enable instrumentation of i915.ko to generate coverage via kcov
> + (/sys/kernel/debug/kcov). This allows coverage driven fuzzing,
> + such as AFL, to be used and focused on the driver.
> +
> + Recommended for driver developers only.
> +
> + If in doubt, say "N".
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 0afe7b3cad07..2f4bbaca5b60 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -3,6 +3,7 @@
> # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
> +subdir-ccflags-$(CONFIG_DRM_I915_KCOV) := $(CFLAGS_KCOV)
s/:=/+=/
> subdir-ccflags-y += \
> $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
>
> --
> 2.8.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread