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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 Dec 2017 19:14:55 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     Paul Lawrence <paullawrence@...gle.com>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com,
        linux-mm@...ck.org, linux-kbuild@...r.kernel.org,
        Matthias Kaehlcke <mka@...omium.org>,
        Michael Davidson <md@...gle.com>,
        Greg Hackmann <ghackmann@...gle.com>
Subject: Re: [PATCH v3 2/5] kasan/Makefile: Support LLVM style asan
 parameters.


On 12/02/2017 12:36 AM, Paul Lawrence wrote:
>

Missing:
	From: Andrey Ryabinin <aryabinin@...tuozzo.com>

Please, don't change authorship of the patches.

> LLVM doesn't understand GCC-style paramters ("--param asan-foo=bar"),
> thus we currently we don't use inline/globals/stack instrumentation
> when building the kernel with clang.
> 
> Add support for LLVM-style parameters ("-mllvm -asan-foo=bar") to
> enable all KASAN features.
> 
> Signed-off-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
> ---
>  scripts/Makefile.kasan | 29 ++++++++++++++++++-----------
>  1 file changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
> index 1ce7115aa499..7c00be9216f4 100644
> --- a/scripts/Makefile.kasan
> +++ b/scripts/Makefile.kasan
> @@ -10,10 +10,7 @@ KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET)
>  



> +   # -fasan-shadow-offset fails without -fsanitize
> +   CFLAGS_KASAN_SHADOW := $(call cc-option, -fsanitize=kernel-address \
> +			-fasan-shadow-offset=$(KASAN_SHADOW_OFFSET), \
> +			$(call cc-option, -fsanitize=kernel-address \
> +			-mllvm -asan-mapping-offset=$(KASAN_SHADOW_OFFSET)))
> +
> +   ifeq ("$(CFLAGS_KASAN_SHADOW)"," ")

This not how it was in my original patch. Why you changed this?
Condition is always false now, so it breaks kasan with 4.9.x gcc.

> +      CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
> +   else
> +      # Now add all the compiler specific options that are valid standalone
> +      CFLAGS_KASAN := $(CFLAGS_KASAN_SHADOW) \
> +	$(call cc-param,asan-globals=1) \

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ