Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp589702imp; Thu, 21 Feb 2019 07:22:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IaXc6dk4/8xw8FJ0FEAlDOgBw1DkcgMXibmySGoUcHtIII8mzRJSs4xMnJQaKMC0+6KhV7n X-Received: by 2002:a63:9402:: with SMTP id m2mr33856834pge.93.1550762553061; Thu, 21 Feb 2019 07:22:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550762553; cv=none; d=google.com; s=arc-20160816; b=EeGu30eC3G2r+E/Ct7U9A30yg5idiIe3Oj8sRyAz031ytW7+iI/RduoqBRE3AXrCgd 7hID7qUxvR2g4Dq/p7ikAJpK5aCbawBaHXNRc5GorhNZo5LUwAsu/YNdL/HAad5mgyu4 8vvWQLIhXGUxM8/1gtMpH10KocT3l9XYPy7hlz/aCVYsjN8pD1xnfI9eYriMadIDxZrK DQkGmK9p23trXMIYf7SJbHWmDzIDLeETzUq+fIvO1Nv8RLuwVxc1g8Af/CB4R1KNKbWG 6yV3Wl9OiRg1ruWt1Vxn8UVX0p7nBIFGNXzw1I9mY+HgpGEk5uhX28/rfqDazxXK+B1P pLOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=p/W3U2vUR32gNWQPlO+z5ZII57FxXXn/iClOl7jfBaE=; b=GCqi9j1cENm4bL6Rsl6a0iMUgxosBhe1EYEivYkV+wUQqkBxcjyqWbakEwsbMdLTlb 9u293bLTSlYeKSHjgcBJJpLkdO9HQ76gvyIwUaFcmpRCVSiYctXPa+5BN0dksqmti7Ll LVJVhfVDlLmhLkjWcDAxNyBxmBY/meJ5FLBYZnJJ69qN3YjxssmEiaDaVVJ/sGmPSCg/ kI3Rj3b/IQXBykMQL96yxT4Mqm9JRVNajJ7yaBtctWzNl+JcKIp7V23ImJAtEH3X8TYp FkS7w1zbmbCAZDH5WELtTdtjBffzzUs9cKaVI8sb267uAO9agrFZ7wlzpbqtOl7Llsg3 7Jpg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d21si799757pll.437.2019.02.21.07.22.16; Thu, 21 Feb 2019 07:22:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727553AbfBUPUG (ORCPT + 99 others); Thu, 21 Feb 2019 10:20:06 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:39503 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbfBUPUG (ORCPT ); Thu, 21 Feb 2019 10:20:06 -0500 Received: by mail-qk1-f193.google.com with SMTP id x6so4451168qki.6; Thu, 21 Feb 2019 07:20:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p/W3U2vUR32gNWQPlO+z5ZII57FxXXn/iClOl7jfBaE=; b=BGn/m8V4WoDcch98rLhW2Z6O5vCGxtrN3m2JEz7yVARFSFN/PjFQQ5p0hO1WfnYqcG 4xHCzWvfOvYKXDPi2G2q8RCqdXyM5tZZBvja430FuSj7Rm2mP/v9rsiFYE6NQDu0bo2D usbKzsnWbLWpuwyTUkeN1pyyxNAHaYWMVjBuYKqwEsNaylXUDCrrE0LydO2MOod8jNS9 LV8230g3KdFyTX50LBoFSWPWOwtCZMmZs/fL1tS2pwWMPcHhYRLHgHu/lWAM4j2S8vqj ZWhcFaRMbJFWaPo4s/vywNwFb/Czycc9v4wXzrZ3a4tKpG2t+aMV2XDdUqYtLyZu1Swi xvXg== X-Gm-Message-State: AHQUAuZd0fMqxHjpMOJordrWcdQ0qpFsr10+0gV9+n5AHe6L7e/szwcs dFbFXhYQeAC6/Nc8DQwQ8IxMz9SxmaDLW3vsmI8= X-Received: by 2002:a37:d492:: with SMTP id s18mr27848478qks.343.1550762404969; Thu, 21 Feb 2019 07:20:04 -0800 (PST) MIME-Version: 1.0 References: <20190219214940.391081-1-arnd@arndb.de> In-Reply-To: From: Arnd Bergmann Date: Thu, 21 Feb 2019 16:19:47 +0100 Message-ID: Subject: Re: [PATCH] kasan: turn off asan-stack for clang-8 and earlier To: Andrey Ryabinin 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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= Arnd