Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753314AbdLDQwe (ORCPT ); Mon, 4 Dec 2017 11:52:34 -0500 Received: from mail-he1eur01on0118.outbound.protection.outlook.com ([104.47.0.118]:15072 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752908AbdLDQvp (ORCPT ); Mon, 4 Dec 2017 11:51:45 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Subject: Re: [PATCH v3 2/5] kasan/Makefile: Support LLVM style asan parameters. To: Paul Lawrence Cc: Alexander Potapenko , Dmitry Vyukov , Masahiro Yamada , linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Matthias Kaehlcke , Michael Davidson , Greg Hackmann References: <20171201213643.2506-1-paullawrence@google.com> <20171201213643.2506-3-paullawrence@google.com> <33f13b1a-494c-67d5-a470-294867c06f9a@virtuozzo.com> From: Andrey Ryabinin Message-ID: <2da6480e-08ff-2444-7abf-2964de53e7ff@virtuozzo.com> Date: Mon, 4 Dec 2017 19:55:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0701CA0069.eurprd07.prod.outlook.com (2603:10a6:3:64::13) To HE1PR08MB2825.eurprd08.prod.outlook.com (2603:10a6:7:2e::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4dcb2c82-0680-4e75-8767-08d53b374bff X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(2017052603286);SRVR:HE1PR08MB2825; X-Microsoft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edvJjFsD5cjY1g1aFxki5D6YhVpMH/zTUogMOQCwN2S9y5MIJiC5gU6/HL8IWOxqiLWOE0deWY+uZqTrHZUEjWeyHCqoDenx8UW1clkiBlpniVlMB64jHifLBtEFApQSCpJVRw4DvsvpbPdkeazx2mkACmsqzgnW+CsqFWMLnGU0SfK6yJ3VNGOcVjmWyOMaabfzQTj+K5+gYMxeX6Osu1lfQiUXzv71Ph6vvByvL+WtD3NmCh+8g2Iv0sTZMB3Bo94d7Ih5AXsoeWVydVXjrKw8i8TqIoFdKJAZk37gc=;4:XgpKwXW41pNM7pLymnYVnSmlILOt+UO1zVlb2HLps0pHFzGPx989XmLVyo2Aw8i2Eb5kQJXjVMzDVxgLbw1dlAr0vFEXdMWz+7XB2W15xKIHINW7owbUL0l6uxSeCz0y6ApWUqbQWFx6E8Il5IO52tXknu5GyHyel6wkaQ2OCpHNeP/yAyzpfd8DiIqPBy+S4gnYnAV2MsJF9DpIxBpu5LBOxYsvFeYaZ7cz2jg3QZS837+2rqk/6wSIfumNHGgQHI/Nj5jC4F0sAPqCQxjj7w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(3231022)(93006095)(93001095)(3002001)(6041248)(20161123560025)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011);SRVR:HE1PR08MB2825;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:HE1PR08MB2825; X-Forefront-PRVS: 051158ECBB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(376002)(346002)(366004)(24454002)(189002)(199003)(52146003)(23676004)(106356001)(2486003)(54906003)(2950100002)(53936002)(6246003)(6486002)(189998001)(33646002)(93886005)(55236003)(77096006)(52116002)(4326008)(478600001)(50466002)(31696002)(105586002)(86362001)(6116002)(58126008)(54356011)(83506002)(305945005)(6916009)(76176011)(7736002)(6666003)(68736007)(53546010)(36756003)(2870700001)(101416001)(2906002)(81166006)(8676002)(65826007)(81156014)(3846002)(97736004)(25786009)(229853002)(64126003)(7416002)(31686004)(47776003)(65956001)(16576012)(66066001)(5660300001)(16526018)(8936002)(316002)(65806001);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR08MB2825;H:[172.16.25.12];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtIRTFQUjA4TUIyODI1OzIzOjNManNhWTJyenVqaWVyeW9ka2V1SXpSUDdr?= =?utf-8?B?OUlmb2JxbUVMMFcvR2hOcmhRZDJaM1Rmbm8zbFZ1MDFuaXhnK2tZQk9LS0w1?= =?utf-8?B?WG9ZQ2M5cEd3ZEk3andjclBKZFlCdFNqODJuRkI3eks0RkE0TkZqQ2RlVExB?= =?utf-8?B?UWpTdHRPSzR3eWg0UHJMenpMR3B5SXdVelFSUEI0MFYvMUFyOEJuQ2ZjeXVS?= =?utf-8?B?YnlzV01kMS9sSlQxM3Rwc3llS0xSMVladi9LU0lRVU1Fcjd4Yy9JcXRZbkdW?= =?utf-8?B?aVBMNmNVa3Q0eWtNUmVXUUJHRVFqcTZDSjZlTkpGZS9nZ2pCWkpZa2oxai9S?= =?utf-8?B?SCsvbFIxSVlsVWxVMnBWOWcveElPZFJRVlFYdlVxVmFaQUp6d1B6Z2h1cmp0?= =?utf-8?B?SXBTR3lWVUJUOWM4d1JyMDNwcU9pT3NLcEpBZWdHWDdmeWIwaHJGTE1Sak95?= =?utf-8?B?MWhLNVlvaHJVTSs5c0ZPdUcxQ3kyeHowNzArK1JTdUxiYjNHTmpKYjBkRzVv?= =?utf-8?B?K2lSMTc5ZXBTZm43UjIxaXliOEFxSkppb3RtY0lJKzVuK3BZOEJqTG91WmJp?= =?utf-8?B?QnZjdjMrMEVBdU84TUxObDNrc1JSM1BxZ1Yxe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osDQCVppSC/VvJJFE4CTC+JVYnLD69SskKBPLyc2i4Gi9AfGknWX5j2n1nOeVWoecT5NJAZarfAnCKlQ=;24:4WnGupNt4tAOZcKCj4mNy07VF7JXuLkKLrOk/VF1ya8HJ4RpwJ4FPo+cUR614SNi0LPMJHiwVtZsK9a88pBhSxa9GP9E7b5dZc++JvFOnUE=;7:9mM+rNf9YeuiUUtapjmMOaJfYmGJTxVrCExP+eR+Gs2ToDq6m+UWE48Tm/fIhasXbag2JvEeTsxztgo51tr0k3CoJPwnipFjV4OVjxxuHWs/6qkr35jn5A7gb8Bu29PkwEcaVXzgad4p0FLggZR7eT1ZyOEZX+h/k35qZ+i6FAt8qUZXLI0PiQByM2t6RSFCcjbj4PtM1/uf4Ns2Ueac+SxhN1Maq8kV3nx2PU5ryL4ktF2Cr93ljo6LZF8/KZHK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR08MB2825;20:ZqzxcPNwQbm2sn+rMfH8MfUdXTIxaZs3sMU0EP/FomiwwuedyfC5IxmG8O+Iq8zqinEtq7AWo71M17Cp2vHt0FNXoOFOYxujBfiidsSsdxl0pgcLiok2wCcyzhILc85e6yB03IAk7bdsJqeGnK+zCyJninhcbWjX2ygq+7zHTCM= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2017 16:51:42.3321 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4dcb2c82-0680-4e75-8767-08d53b374bff X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2825 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1772 Lines: 44 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