linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Marek <mmarek@suse.cz>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kasan: Makefile: shut up warnings if CONFIG_COMPILE_TEST=y
Date: Thu, 09 Apr 2015 13:06:38 +0200	[thread overview]
Message-ID: <1428577598.14000.31.camel@x220> (raw)
In-Reply-To: <1428507505-4015-1-git-send-email-a.ryabinin@samsung.com>

On Wed, 2015-04-08 at 18:38 +0300, Andrey Ryabinin wrote:
> It might be annoying to constantly see this:
> 
> 	scripts/Makefile.kasan:16: Cannot use CONFIG_KASAN: -fsanitize=kernel-address is not supported by compiler
> 
> while performing allmodconfig/allyesconfig build tests.

That warning might be seen - once per build - because allmodconfig and
allyesconfig enable both CONFIG_KASAN and CONFIG_COMPILE_TEST, right?

> Disable this warning if CONFIG_COMPILE_TEST=y.

Do we expect that some people want to enable both KASAN and COMPILE_TEST
manually (ie, not as a result of allmodconfig or allyesconfig)? If so,
those people might now be in for some head-scratching if their compiler
lacks what's apparently needed to run kasan.

> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
> ---
>  scripts/Makefile.kasan | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
> index 631619b..3f874d2 100644
> --- a/scripts/Makefile.kasan
> +++ b/scripts/Makefile.kasan
> @@ -13,12 +13,16 @@ CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \
>  		--param asan-instrumentation-with-call-threshold=$(call_threshold))
>  
>  ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),)
> +   ifneq ($(CONFIG_COMPILE_TEST),y)
>          $(warning Cannot use CONFIG_KASAN: \
>              -fsanitize=kernel-address is not supported by compiler)
> +   endif
>  else
>      ifeq ($(CFLAGS_KASAN),)
> -        $(warning CONFIG_KASAN: compiler does not support all options.\
> -            Trying minimal configuration)
> +        ifneq ($(CONFIG_COMPILE_TEST),y)
> +            $(warning CONFIG_KASAN: compiler does not support all options.\
> +                Trying minimal configuration)

(Side note: in this case the compiler supports that minimal
configuration, doesn't it? So shouldn't the second warning end in
                Running with minimal configuration)

or something to that effect?)

> +        endif
>          CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
>      endif
>  endif

Thanks,


Paul Bolle


  reply	other threads:[~2015-04-09 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150407160213.8f66c90ca812c30f362dd543@linux-foundation.org>
2015-04-08 15:38 ` [PATCH] kasan: Makefile: shut up warnings if CONFIG_COMPILE_TEST=y Andrey Ryabinin
2015-04-09 11:06   ` Paul Bolle [this message]
2015-04-09 12:44     ` Andrey Ryabinin
2015-04-09 16:01       ` Paul Bolle

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=1428577598.14000.31.camel@x220 \
    --to=pebolle@tiscali.nl \
    --cc=a.ryabinin@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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).