[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2da6480e-08ff-2444-7abf-2964de53e7ff@virtuozzo.com>
Date: Mon, 4 Dec 2017 19:55:15 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Paul Lawrence <paullawrence@...gle.com>
Cc: Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
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/04/2017 07:20 PM, Paul Lawrence wrote:
>
> > + # -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.
>
>
> I had the opposite problem - CFLAGS_KASAN_SHADOW is always at least a space, and the
> original condition would always be false, which is why I changed it. On investigation, I found
> that if the line was split it would always be a space - $(false,whatever,empty-string) would be
> truly empty, but if the line was split after the second comma it would be one space. Is this a
> difference in our make systems?
I dunno, but it could be.
Anyways, does the fixup bellow works for you?
---
scripts/Makefile.kasan | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
index 7c00be9216f4..d5a1a4b6d079 100644
--- a/scripts/Makefile.kasan
+++ b/scripts/Makefile.kasan
@@ -24,7 +24,7 @@ else
$(call cc-option, -fsanitize=kernel-address \
-mllvm -asan-mapping-offset=$(KASAN_SHADOW_OFFSET)))
- ifeq ("$(CFLAGS_KASAN_SHADOW)"," ")
+ ifeq ($(strip $(CFLAGS_KASAN_SHADOW)),)
CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
else
# Now add all the compiler specific options that are valid standalone
--
2.13.6
Powered by blists - more mailing lists