Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1531720imu; Wed, 16 Jan 2019 22:11:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ThQwdA0HbkOaeiUCD2R5kzGbGMVP8SZb0Cg0sNzMTQwb1BIZNGfxsWjyPvNqA55TPQx+q X-Received: by 2002:a62:190e:: with SMTP id 14mr13629801pfz.70.1547705513694; Wed, 16 Jan 2019 22:11:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547705513; cv=none; d=google.com; s=arc-20160816; b=dZlCj3dUPhN56HW7ljMRVMHbhqaOM814x4B97/mRYjG7zRcr2QGZmu1fnM43hVktZ4 N1KPm7z5kf8nAkxQ6pZAe4Zncg9LVzN7MViCYFOdONOjkukt6cLCBI583gQubMUArIfP hvER+zqY98pd+WA84ixF6L+abO4Todd8R3Wb8iqQ7A+2ziUiJCBs/xif9Kpr9K3/F0W4 aHlSybdo+whHgV7enFGkDunqJqo9PpYRUilqDkeOtSX87loiwfhHasakln3+M1YtDEjo rJaBz3VMezpHwKZ7xOwpntFc/Cos+pHRAqXQge4otXpJgyX2jXJK/QhTMCnbAk2Kswit Dftw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BpVz66mDY8Nj5AscAcSZHHZzVU6PEMH8NcfeX3mdNdI=; b=HADQ6wXvQStwFEtMhSMPGeWiRj8O9A7c3+YyrojcQ2sRk5aNXWVikRXnl7dk3iThc8 pEiAxc0n2MYl8l3Zl6wSGVHHbnEX5nlz3ccv6TFoIB0JnYyGYH6zBOBBMPUJY3M3RSNq qg5rS43UuEpbPQJWSUL+HnUvHnjfWoJMSlraDuBDQzVfdEutvA62OL70Hj9YvJIAxplo n7KMyGePRxQsSCb1DU750kcGM7e3YEKKHxjgYEUQvClYhQf9A8bXfNYmRfQPWdHsksOM s9XeH4UNgPOu2gU8+l9OYHTWBKNJ2tNhJXY1zx6vjmtGaD6LObuc2G2X7OU/FZiDBD4i XxvA== 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 y20si693798pgi.50.2019.01.16.22.11.36; Wed, 16 Jan 2019 22:11:53 -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 S2394260AbfAPQrT (ORCPT + 99 others); Wed, 16 Jan 2019 11:47:19 -0500 Received: from foss.arm.com ([217.140.101.70]:52780 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394251AbfAPQrT (ORCPT ); Wed, 16 Jan 2019 11:47:19 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 06095A78; Wed, 16 Jan 2019 08:47:19 -0800 (PST) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 981C63F5AF; Wed, 16 Jan 2019 08:47:16 -0800 (PST) Date: Wed, 16 Jan 2019 16:47:13 +0000 From: Will Deacon To: Andrey Ryabinin Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, Qian Cai , Alexander Potapenko , Dmitry Vyukov , Catalin Marinas Subject: Re: [PATCH] kasan: Remove use after scope bugs detection. Message-ID: <20190116164712.GB1910@brain-police> References: <20190111185842.13978-1-aryabinin@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190111185842.13978-1-aryabinin@virtuozzo.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 11, 2019 at 09:58:42PM +0300, Andrey Ryabinin wrote: > Use after scope bugs detector seems to be almost entirely useless > for the linux kernel. It exists over two years, but I've seen only > one valid bug so far [1]. And the bug was fixed before it has been > reported. There were some other use-after-scope reports, but they > were false-positives due to different reasons like incompatibility > with structleak plugin. > > This feature significantly increases stack usage, especially with > GCC < 9 version, and causes a 32K stack overflow. It probably > adds performance penalty too. > > Given all that, let's remove use-after-scope detector entirely. > > While preparing this patch I've noticed that we mistakenly enable > use-after-scope detection for clang compiler regardless of > CONFIG_KASAN_EXTRA setting. This is also fixed now. > > [1] http://lkml.kernel.org/r/<20171129052106.rhgbjhhis53hkgfn@wfg-t540p.sh.intel.com> > > Signed-off-by: Andrey Ryabinin > Cc: Qian Cai > Cc: Alexander Potapenko > Cc: Dmitry Vyukov > Cc: Catalin Marinas > Cc: Will Deacon > --- > arch/arm64/include/asm/memory.h | 4 ---- > lib/Kconfig.debug | 1 - > lib/Kconfig.kasan | 10 ---------- > lib/test_kasan.c | 24 ------------------------ > mm/kasan/generic.c | 19 ------------------- > mm/kasan/generic_report.c | 3 --- > mm/kasan/kasan.h | 3 --- > scripts/Makefile.kasan | 5 ----- > scripts/gcc-plugins/Kconfig | 4 ---- > 9 files changed, 73 deletions(-) For the arm64 part: Acked-by: Will Deacon but I defer to you and Dmitry as to whether or not you go ahead with this. Will