Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2019 13:28:58 +0800
From:      Li-Wen Hsu <lwhsu@freebsd.org>
To:        Andrew Turner <andrew@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r343713 - in head/sys: amd64/conf arm64/conf
Message-ID:  <CAKBkRUzz16nWf7-Vo=6V44GFYMV2mHBrzju_iyrP1KUNbzbvSw@mail.gmail.com>
In-Reply-To: <201902031246.x13CkRY5049231@repo.freebsd.org>
References:  <201902031246.x13CkRY5049231@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 3, 2019 at 8:46 PM Andrew Turner <andrew@freebsd.org> wrote:
>
> Author: andrew
> Date: Sun Feb  3 12:46:27 2019
> New Revision: 343713
> URL: https://svnweb.freebsd.org/changeset/base/343713
>
> Log:
>   Enable COVERAGE and KCOV by default on arm64 and amd64.
>
>   This allows userspace to trace the kernel using the coverage sanitizer
>   found in clang. It will also allow other coverage tools to be built as
>   modules and attach into the same framework.
>
>   Sponsored by: DARPA, AFRL
>
> Modified:
>   head/sys/amd64/conf/GENERIC
>   head/sys/arm64/conf/GENERIC
>
> Modified: head/sys/amd64/conf/GENERIC
> ==============================================================================
> --- head/sys/amd64/conf/GENERIC Sun Feb  3 11:41:43 2019        (r343712)
> +++ head/sys/amd64/conf/GENERIC Sun Feb  3 12:46:27 2019        (r343713)
> @@ -102,8 +102,8 @@ options     MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9)
>  options        VERBOSE_SYSINIT=0       # Support debug.verbose_sysinit, off by default
>
>  # Kernel Sanitizers
> -#options       COVERAGE                # Generic kernel coverage. Used by KCOV
> -#options       KCOV                    # Kernel Coverage Sanitizer
> +options        COVERAGE                # Generic kernel coverage. Used by KCOV
> +options        KCOV                    # Kernel Coverage Sanitizer
>  # Warning: KUBSAN can result in a kernel too large for loader to load
>  #options       KUBSAN                  # Kernel Undefined Behavior Sanitizer
>
>
> Modified: head/sys/arm64/conf/GENERIC
> ==============================================================================
> --- head/sys/arm64/conf/GENERIC Sun Feb  3 11:41:43 2019        (r343712)
> +++ head/sys/arm64/conf/GENERIC Sun Feb  3 12:46:27 2019        (r343713)
> @@ -94,8 +94,8 @@ options       USB_DEBUG               # enable debug msgs
>  options        VERBOSE_SYSINIT=0       # Support debug.verbose_sysinit, off by default
>
>  # Kernel Sanitizers
> -#options       COVERAGE                # Generic kernel coverage. Used by KCOV
> -#options       KCOV                    # Kernel Coverage Sanitizer
> +options        COVERAGE                # Generic kernel coverage. Used by KCOV
> +options        KCOV                    # Kernel Coverage Sanitizer
>  # Warning: KUBSAN can result in a kernel too large for loader to load
>  #options       KUBSAN                  # Kernel Undefined Behavior Sanitizer

This breaks gcc build:
https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/8781/console :

x86_64-unknown-freebsd12.0-gcc: error: unrecognized command line
option '-fsanitize-coverage=trace-pc,trace-cmp'; did you mean
'-fsanitize-coverage=trace-pc'?

We probably need to adjust arguments passed to gcc.

Li-Wen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKBkRUzz16nWf7-Vo=6V44GFYMV2mHBrzju_iyrP1KUNbzbvSw>