Received: by 10.223.176.46 with SMTP id f43csp1179472wra; Fri, 19 Jan 2018 07:59:49 -0800 (PST) X-Google-Smtp-Source: ACJfBouS5Pl65gg8vmqpO4PFaOzsClPI63BUZFJZiYqaJFGzEpnN5DgGHL2KyIWFOe6lcgxl2gP+ X-Received: by 10.98.24.22 with SMTP id 22mr38101250pfy.65.1516377589089; Fri, 19 Jan 2018 07:59:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516377589; cv=none; d=google.com; s=arc-20160816; b=M97cMiP2ooxETdAV/7UdCCQgPieR9Nv9iUvvNTrTlggCOO86iV0qcV7zxqcvDJSh7a Xgeec9J1I1cFurQ3Lp6zftVA5rytdwilHLjhESaSBMkrEr8qJabkxic7/pUnb3mahsIU HIUZ70/ArC4p1tuQ38ZSByROBGBXLSukdMQYWi3ExuszexsqVbNXmbcayAlV+ngd4hRA 8Y0L3+Q5meU0xcUIXMtF7tXLQHgDVRHpEcddf5V85nittgISKHb5K739VOn45nPVgukz ok4bUGUuLgxmWIwO7AL1CLkpJEZnVdOsgEWek/PA5LnWEwfXsCX0VJCr36SXjGzuug74 lYOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=63CE2VHgnmxwXlfpbOkNneGrN8IRCqpjfISvUnWIJm4=; b=EDvQFBmRuGSKQFp2dVdQK3IaDzWWkKt2GP5LWd3vlryEGGrckNb89bYDgiBUuIlaJ0 1CBOaWE2w5QOv0ZdTbSeyt6JMhXXrI71zmdDSODz6wFDG5NzOI/1cPAfU6K25pwuPdQD gnzMnCoZK47RnN5rKf917ukJCJL3l2gwYVnKMbMQUp36dnwRW/lYAJSh3fCH9Oi6WSr+ DRHMw2Fur+MUjgAKD0dqULJHy31KiVs7o9mAW3IPaCyKUeRrzaYhxXUjCg3KNV8Cb5/B V3bwRO4aFJhMHTjSwAqk3TFbzSxXxKP0cg9gJYVWREWqTsxjzviPCYXlXvmeflSOdNTC LBVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=U70wwkhg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si8567290pgu.65.2018.01.19.07.59.09; Fri, 19 Jan 2018 07:59:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=U70wwkhg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756024AbeASP6G (ORCPT + 99 others); Fri, 19 Jan 2018 10:58:06 -0500 Received: from mail-ve1eur01on0114.outbound.protection.outlook.com ([104.47.1.114]:62871 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932456AbeASP52 (ORCPT ); Fri, 19 Jan 2018 10:57:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=63CE2VHgnmxwXlfpbOkNneGrN8IRCqpjfISvUnWIJm4=; b=U70wwkhgzwxEQ3ifR3Ox0CX31ERSF8hhWpV01kklh81W5Fi2tvvtfF913lqV9EZX0BKCfvJIJ29KW15rWxEJDjR3XoWrVoD2LL/B75rWfeR1RPevpsPpve7o8W1UN8BrNCAqsSOOFdA/Atsf9aXc02g//32OuLIavXHbZFJvGpY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from [172.16.25.12] (195.214.232.6) by VI1PR08MB2829.eurprd08.prod.outlook.com (2603:10a6:802:19::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Fri, 19 Jan 2018 15:57:22 +0000 Subject: Re: [PATCH] kasan: don't emit builtin calls when sanitization is off To: Andrey Konovalov , Masahiro Yamada , Michal Marek , Alexander Potapenko , Dmitry Vyukov , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com Cc: Kostya Serebryany , Evgeniy Stepanov , Nick Desaulniers , Stephen Hines , Pirama Arumuga Nainar , Manoj Gupta , Greg Hackmann , Andrew Morton References: <7d2dddbb7e4d4522fcf8e57c7da072c1ac76e1b0.1516373316.git.andreyknvl@google.com> From: Andrey Ryabinin Message-ID: <20516c34-7826-e07a-cda6-6228776ebee6@virtuozzo.com> Date: Fri, 19 Jan 2018 18:57:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <7d2dddbb7e4d4522fcf8e57c7da072c1ac76e1b0.1516373316.git.andreyknvl@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR1001CA0028.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::14) To VI1PR08MB2829.eurprd08.prod.outlook.com (2603:10a6:802:19::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a9464370-57e8-4933-0222-08d55f5554b4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:VI1PR08MB2829; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB2829;3:CX+PAx7ofonHbc2Gaz8nvYww0ZrinUfPTcHWdYboN6EPromb3rTWGHO98dAPZQnqOPzRf+lmK48ANb2oF0bxX5qqyVIBmLb5zVui3WSFMnoC3NcAZbJz7Qls3DKIeuilU0VkdFdsKjGp2LTW7qOwafnehpO+23aFtmo2EFN+dB71WkDUJ4857tLtzkSz8cXfJ6/3j8FQd/sownlDcxKK5KJnt9DGhO0/2mY9RM9GNdelxVIFCIbO7digoHMml48A;25:2lvOEq7BM1eWTPvZg9DVDDyeuDFmQeGm7oRWs3uGHViHNDQJfqq4pQR/5ydlIZZX+TWa2l2O5lTYXZg5Ka+3I4s2/PJL21CDidIVkgNN9RNdFP61Bgg6YyxXAIZqdjNN9xFJuT6ShKGtAFctjNwHJB/ES3YaFD7DZQLzTStxhqQ8Bom3B2PNpSfy8a3bxqwH5/IekzqoeS/rdSepAebnSS11AHZZfmJu0c/x2BGPb0hrDqIFMeJpiM/1+S6Wap5dChsdNmdAKYStZM9usWsdiudy485rTIcAHXPDxCqLVGRR6LSYNzoX3CohrG/O8IfqEfh5IaOWDGx41YO/2lWTrQ==;31:OISly6y5FQxpl7XMvMF27+BrOexLUp+ORIAR4CRmdtHUGBnTb414gcn50ris3YZddL0Qs4gyq7BXXtRUiihvQLyqFAgMggMtlquP1/TmFCQni3MvV5kCpRcFA4D58EeUNZCPcx6kHumiBdwh5kgWXDG7/PJehVWRg68H59k7Z6Wak/eMsEr4n8445gtf4BL6vOFpIkYvl9/gS1yQPMK2q/tmJgCR4uUPvOp8TolVpEQ= X-MS-TrafficTypeDiagnostic: VI1PR08MB2829: X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB2829;20:J8ghmuqz79ROtl1qwc4yiEt2rTK1eGhJ0iNvMfF/ibPhy1kw0sGZLrGBqAfXtiisEtR+CwYI10RVEK67dzkkigs1oJGsDXEavtIInC27iveENnZVR2WS4OFCUypTwhhivQYSc2Ohupl1u/+r49v1Awc1DZOSToHVc9Q1zi9Voaz5frcwU+/oLaqY8pkLrbQOwABOuWx+sAwoEFkKJ/G23hqFkHKl4FuTLQNSx1So7ItOYJrTEHtv7cd9FgLtdFDGXNcIP+7QnTKOqo3TjZd86KjLgrfqdl4tmGoU/d8gIoUD5WIhBoiSLftI9rvIiv/SpaPgiwq9v8M4qr5nCQ6LDuv9IGXy0w+qXry41luDX5t36Cbm7Nsbpqc+2/9XxEDSHyL3/F297Y95G4jTrdjV516gz8gC9xikswz4+SKc4o4=;4:y+1t50be3Ccl+zVzA/wEOTXsahAeQoovcCrw4dEIxnBZEd4DJw/2ibx+5EbbrN9EHQHhMwXhp4MWpZ0CzWU95RMi7NGVPzplQnKb6AteWnmfac6Q+bXtJRpXRUoh9JvLTkxpazb5vh7n+MChLeKcKSPlFVcQy5kFZOtppDS/SPb22uMPiF/epfB+CqcVRtA/HXyL4oq9cT2dPuGCSXYo88Szv0un/dCysndfeD/xBfNlalRBn1G3tlAFoWb7DpF86/VzrtFadurinm/rz7Pzog== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231023)(2400079)(944501161)(3002001)(6041268)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011);SRVR:VI1PR08MB2829;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:VI1PR08MB2829; X-Forefront-PRVS: 0557CBAD84 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(346002)(396003)(39380400002)(376002)(39850400004)(366004)(199004)(189003)(64126003)(36756003)(106356001)(110136005)(16526018)(54906003)(31686004)(316002)(8676002)(58126008)(16576012)(81156014)(6486002)(47776003)(7736002)(65956001)(50466002)(65806001)(81166006)(8936002)(83506002)(229853002)(66066001)(53936002)(23676004)(52146003)(305945005)(68736007)(2486003)(52116002)(3846002)(7416002)(76176011)(4326008)(97736004)(6246003)(2906002)(25786009)(478600001)(86362001)(105586002)(230700001)(77096007)(386003)(26005)(6666003)(31696002)(6116002)(53546011)(65826007)(5660300001)(2950100002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB2829;H:[172.16.25.12];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA4TUIyODI5OzIzOi95T3Y1VVRIYlY1UWdLNVE3dnFJOFNRbFpu?= =?utf-8?B?dHQ3WHNXTFRSQXZTaG9DRjJiVTFtdnZYZVNEOEpPTG5tSCs0aVpUZlU5VGJM?= =?utf-8?B?ek1GdHdYVjZTcStuR3E3WUpwWSttMEJZVnJNb2o5eElLeXJIMmNoQXlncXI3?= =?utf-8?B?R3FKNHVMMnZXLzVHbnN5TU51Kzl2Q2dsRHZpZFdqSVU3U0p1TVhjTUYwMjlZ?= =?utf-8?B?aWFVemVSSU14TU5zbHkzQTBtSFhmTzE0TnFtWlhWLzhtSzkvdDdGNnBkZXRS?= =?utf-8?B?WCt2YjV3a0RlZEZwZzVuL1IvMWRyZFJ2ZW90aUJSUVJ3eTdub0V0aTRoVGoz?= =?utf-8?B?USs1UzE5QktpMGpMZnFyeDR6M2hjUjRqTTdxaXhLaTVNOS9uU0dWaDZkUnYv?= =?utf-8?B?MVYwNm1qdldMZTdDTFcxZFRIeEZyeVpaTUZnd1FkYnVpR3hzdHZ3WFA5OFZG?= =?utf-8?B?V0s5aWc3S0ZQcWd4bVpBejY3Y0JUT1FUWHVXSTJWSk9zMHBxVHJDMUdJdkJK?= =?utf-8?B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x1e+6BW4iINExqs/bYZ8ojjAIHG7OmHCHWA9yMIF+3BgaRi10iihdE=;24:1i8RpHmJlfZQHMvi/yo67SgXAbGQ9qtRlrBdesZo/FREaSm8YTceTTvpU9Cyc1qt6Ya3CAQqb+NpBP0zZytSvslTBBVOxFuRU9nynL4Jug8=;7:aLGVYsOZxmGnwO8u90YxHzPmZSzrD0p1mQgI96qlpoHskXryU3z/ECFW/qAGVbXKG8wwC7Zss8NBb3ZSKfw7sTQnJ4o4bpkaI7fA2FZj1sdTxGJvcBL2hVvqxiNHEO4efLXmpq4I7qFNvaO0Pq7ptG0olelREJ4sOaUSCaYDqZYyih8F6y6GFCkz5dWCMXIG+C7Uzd3IJf069YRNfex7xI0sSyLoL6XRJO1Ld70MfNQubDu4sZBJKDf4J+mdX/jS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB2829;20:cC/ioFs04PvpWYiy2wVx6LRqItfUO9P2sMXB926+DSWlZOXLL6VXNq5IrkzYsU7USDqf8LB+9B31T5vQJ5gMg043PL2M3MkCppU5OZRIjY6bf6pdJWROWdPJ7S+DbSjQL6yidLjECqq1x08B/RF1/gZntEYOoKp5VuRaHNw4lU0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 15:57:22.1985 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9464370-57e8-4933-0222-08d55f5554b4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2829 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/19/2018 05:54 PM, Andrey Konovalov wrote: > diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan > index dbbd4382f15a..db473309f136 100644 > --- a/scripts/Makefile.kasan > +++ b/scripts/Makefile.kasan > @@ -39,4 +39,7 @@ else > endif > > CFLAGS_KASAN += $(call cc-option, -fsanitize-address-use-after-scope) > + > +CFLAGS_KASAN_NOSANITIZE := $(call cc-option, -fno-builtin) > + I think it should be fine to drop cc-option here. Even ancient versions of GCC have -fno-builtin. > endif > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index 1ca4dcd2d500..015aa9dbad86 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -121,7 +121,7 @@ endif > ifeq ($(CONFIG_KASAN),y) > _c_flags += $(if $(patsubst n%,, \ > $(KASAN_SANITIZE_$(basetarget).o)$(KASAN_SANITIZE)y), \ > - $(CFLAGS_KASAN)) > + $(CFLAGS_KASAN), $(CFLAGS_KASAN_NOSANITIZE)) > endif > > ifeq ($(CONFIG_UBSAN),y) >