lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1428577598.14000.31.camel@x220>
Date:	Thu, 09 Apr 2015 13:06:38 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Andrey Ryabinin <a.ryabinin@...sung.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Marek <mmarek@...e.cz>, linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kasan: Makefile: shut up warnings if
 CONFIG_COMPILE_TEST=y

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@...sung.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ