Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp639579imp; Thu, 21 Feb 2019 08:16:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IZzOA0xngvIx8hNAHXbjfSDnldXAIScvB8olLXGlWOrY7qCoF/oBOnKOGnjFDJDB/WP1BDi X-Received: by 2002:a63:ec48:: with SMTP id r8mr39377619pgj.50.1550765801921; Thu, 21 Feb 2019 08:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550765801; cv=none; d=google.com; s=arc-20160816; b=QnBhs628Qxp0Axam+qJoR+RjgUxsm25Ik0TuhoTK6mQIaS0ZXXmQT0dQuvCyRhtQNL kPxeP89T3lQZhgmUkoGvYbKxQpVPUaPTgIn9rqA5ecmL+NvpntUaFMdnX9AqIQj0Ed8+ Cg44VD/SDLJ+y+XeiBJrP8h+CmHSR6aKHCOFStnUvq8vEP0991bndqW5WbEZpm3DKcs0 m48VlQwu8ADwW0P5BUDtrP9DxbT/s3XvLZoZXpWTYx0eAxilBw+xBizxSHWgX8Y2JUb1 +xBHbjnQ7gbEePuwHgfEh/VaDZXRuvvEYl6qFWQNONo1XFgvnBLcIYTJlIPb/d5es66b fZHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=JSqxb6jpIxGoSxDn8kcgGnOYtq1B1K74Zpsoqzmbjjg=; b=u+ZyaTruWYldtrQVB6vaIqenfmSFordFaobisHpA5B2uATE/Cr9uGn3XkDwAJDjt++ B2QkZbAL4MyPdDB5mBG6sbgm6HRTofxqY7u39sVsmk0nyBvlNdGsEO4oPHWvKeijX5CE usFjKkDKdrWifYRygf3gLycivs5NU+YgeKtmEYgL9lSJkpjnVeOkegEJ5yQ3xfhqTq8E leyeZtWExAoWtSOj7boTa/czwedkRmqIfUXlhjskRYdEZ9HQSmoI9quHYgg3y2kBmgWp nnLZyOXlJ+xkXSRXalp3UJuBCOe0wFOxBHlrwcnk9xeOD4uCbomE54hz9kSvwNZK1PVW eAAg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 y32si17032313pga.518.2019.02.21.08.16.26; Thu, 21 Feb 2019 08:16:41 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728032AbfBUQOR (ORCPT + 99 others); Thu, 21 Feb 2019 11:14:17 -0500 Received: from relay.sw.ru ([185.231.240.75]:34852 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725831AbfBUQOR (ORCPT ); Thu, 21 Feb 2019 11:14:17 -0500 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gwqzE-0001Ba-1w; Thu, 21 Feb 2019 19:14:12 +0300 Subject: Re: [PATCH] kasan: turn off asan-stack for clang-8 and earlier To: Arnd Bergmann Cc: Andrey Konovalov , Masahiro Yamada , Michal Marek , Andrew Morton , Dmitry Vyukov , Nick Desaulniers , Mark Brown , Qian Cai , Alexander Potapenko , Martin Schwidefsky , Christoph Lameter , LKML , Linux Kbuild mailing list , kasan-dev References: <20190219214940.391081-1-arnd@arndb.de> From: Andrey Ryabinin Message-ID: <8e29f564-88e1-90b0-948c-d2fb52db29b9@virtuozzo.com> Date: Thu, 21 Feb 2019 19:14:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/21/19 6:19 PM, Arnd Bergmann wrote: > On Thu, Feb 21, 2019 at 11:06 AM Andrey Ryabinin > wrote: >> On 2/20/19 8:35 PM, Arnd Bergmann wrote: >>> On Wed, Feb 20, 2019 at 6:00 PM Andrey Ryabinin wrote: >>>> On 2/20/19 5:51 PM, Arnd Bergmann wrote: > >>> Maybe bringing it back would be a compromise? That way it's hidden from >>> all the build testing bots (because of the !CONFIG_COMPILE_TEST dependency), >>> but anyone who really wants it can still have the option, and set >>> CONFIG_FRAME_WARN >>> to whichever value they like. >>> >> >> >> I think there is much simpler solution: >> >> --- >> lib/Kconfig.kasan | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan >> index 219cddc913ac..6cd035f06cee 100644 >> --- a/lib/Kconfig.kasan >> +++ b/lib/Kconfig.kasan >> @@ -105,6 +105,8 @@ endchoice >> >> config KASAN_STACK >> int >> + range 0 1 >> + prompt "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && (CLANG_VERSION < 90000) >> default 0 if CC_IS_CLANG && (CLANG_VERSION < 90000) >> default 1 >> help >> -- >> >> >> AFAIK, randconfig is not able to randomize int config options, so it will be disabled for build robots, >> but users still will be able to enable it. > > Right, this will work, but I find it a bit awkward to require users to > enter 0 or 1. > > My assumption is that build bots turn on CONFIG_COMPILE_TEST, so > having a bool option that depends on COMPILE_TEST would be more > conventional. We can debate whether it should also depend on > CONFIG_EXPERT or not. Something like > > config KASAN_STACK > bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG > && !COMPILE_TEST > default CC_IS_GCC || (CLANG_VERSION >= 90000) > > And then a simpler Makefile logic (could also be done in Kconfig) to turn > that bool symbol into an integer argument for asan-stack= > Sounds good.