Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4050025imj; Tue, 19 Feb 2019 14:20:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ8b6+xm6YC7CxCRVCAQLSkgZ6C2+g53hfQhSThjSZmDK1rqCP8P727gh1ucMoLXgLM7IBc X-Received: by 2002:a63:4346:: with SMTP id q67mr25326215pga.92.1550614841004; Tue, 19 Feb 2019 14:20:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550614840; cv=none; d=google.com; s=arc-20160816; b=UhIS3FzKakBfvU46iDTWJJEbC8Z9A1sDVzL5s1zMOHu3L+x2Sv0CiyDNVfypNLcfNT rrJVmascM/Z4T/1qKPxcaDZM2e2gHlk1gLp1zlvtI+kiPLnIvWwuiJOzLlVpj7VFfPFp P3tGZqDGbzsuQ2l/509c34tN9BGOHcibRbm9qLCW9z5hSCDcyfXWGqDhbLOJK0f15ron C4c6VczwrXonK9M4aIOMyDgE6rb2Uj+zNx/99P4X0DtXUfDwTti0qaPUK19K7yA2dM+x uH8Euk3J9ijZOTV0zG1H2JB7bh/E8mToEELXYdp48cV4T3PbzdIKbX6DhCYBexaA1f5I R/2g== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=R/AADH7d9dPw/Xlf484yHkcGyiZK43PrzsOjFifHGL0=; b=nUlT/bCQPn9MnSGNawRG35SCXol//SvpGMNvjcrz1iQdYqaEPJDCZmd1ZwYiIm32tz ZSdeoOq07vrXPxQusziea0Szji1Iroi0T7IQyGTlCS5Ng5gL8YpMoa1CSYoXvZRR1vba tHqc309TbvZiB+7ur5UJfMim11BGAATCcc4JX2eClBmqdQVKR3y3VLM6r3M7bGBgIbGL NzgITU/FIP85kzATT32D6/a0uY4Z2Dsd0gH6+mRfU1A7UQsSTHm/sYv226IQPmDiF65+ tvZPy7By/VScJsG2FX4+/ODPU3SmxbdlRQp6pNSoOE3uKKlroOp03dOv+zQA5SRAvbHc QAmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=COFQxgwh; 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 f12si9831370pgf.184.2019.02.19.14.20.24; Tue, 19 Feb 2019 14:20:40 -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=@lca.pw header.s=google header.b=COFQxgwh; 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 S1729922AbfBSWRs (ORCPT + 99 others); Tue, 19 Feb 2019 17:17:48 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:40411 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729893AbfBSWRs (ORCPT ); Tue, 19 Feb 2019 17:17:48 -0500 Received: by mail-qt1-f195.google.com with SMTP id j36so25096432qta.7 for ; Tue, 19 Feb 2019 14:17:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=R/AADH7d9dPw/Xlf484yHkcGyiZK43PrzsOjFifHGL0=; b=COFQxgwhRUGp+dQANarOvJpdGglFUtsDRm13pOqtjyEgoFqognzyLa+oTlFjdIomJ3 EmoBPFgmqNbNw35fn4jBz3v3rso8XItYJ0zY2WzL/WUXCYjsiCtgs+pzQiWDWzCUdjo5 OSYAJS5Zhkdm3DXNuCIMVBngbaEEq/0zdmjcNe/eLxkjDwrkwMypBEEiAvWypYMTsNq+ FiBAF8D/1ynqgxdRB+nfuUAEQuqMU6/6YycAo+QBoop1geNNPqV2DmTC1AMtrVlJvfdY 4qgOw3VxzthvIC7KoCphNzie6yKEgV+CeJ/0wRXe0dknwPFyEN+kGrb9qtSHZqND3FqY Du+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=R/AADH7d9dPw/Xlf484yHkcGyiZK43PrzsOjFifHGL0=; b=uXaCoctYNSvTt2tzsYTS1FJn8mL8OqQFhbS5XV8Uju/SLqUiYkWFPJSsn4EVYldp6R eIx9iEe1pyTw2g5lwW/Doi0IbDaUAOA9zRiljHqjOOgA/rzgO/xAWiDXoB0ZMLjWny3J 7oFJh8YDL67PA1bG6BbJshJSnklNBPxzZa33nbdwA/9m7m3Xx911wZbMKOCPAqsOypHc r2oY44Ed3YHH4AQ69Itz9BHA6Xm4yyBXWnX/wtP/WnLj5RrJAKMMJsg6dG+Rjn/3jeM5 c9u5FTY7mQjkJnPEtXWPXhg25PmVUpI4cqmJLKtv/OWdwoA3ysOg5f/eEHcJIrkpnDVN WESA== X-Gm-Message-State: AHQUAuZ3zWNm4hShlCGSsLjQzlvTQrK8aw5lr9Zz6NnIIDOE1jCtnQQr TwFdRfKWE/4BqOwBZqK9txCP0Q== X-Received: by 2002:aed:3b25:: with SMTP id p34mr24118031qte.310.1550614666905; Tue, 19 Feb 2019 14:17:46 -0800 (PST) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id o124sm9793596qkf.72.2019.02.19.14.17.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 14:17:46 -0800 (PST) Message-ID: <1550614664.6911.45.camel@lca.pw> Subject: Re: [PATCH] kasan: turn off asan-stack for clang-8 and earlier From: Qian Cai To: Arnd Bergmann , Andrey Ryabinin , Masahiro Yamada , Michal Marek , Andrew Morton Cc: Dmitry Vyukov , Nick Desaulniers , Mark Brown , Alexander Potapenko , Martin Schwidefsky , Christoph Lameter , Andrey Konovalov , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, kasan-dev@googlegroups.com Date: Tue, 19 Feb 2019 17:17:44 -0500 In-Reply-To: <20190219214940.391081-1-arnd@arndb.de> References: <20190219214940.391081-1-arnd@arndb.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-02-19 at 22:49 +0100, Arnd Bergmann wrote: > Building an arm64 allmodconfig kernel with clang results in over 140 warnings > about overly large stack frames, the worst ones being: > > drivers/gpu/drm/panel/panel-sitronix-st7789v.c:196:12: error: stack frame size > of 20224 bytes in function 'st7789v_prepare' > drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c:196:12: > error: stack frame size of 13120 bytes in function 'td028ttec1_panel_enable' > drivers/usb/host/max3421-hcd.c:1395:1: error: stack frame size of 10048 bytes > in function 'max3421_spi_thread' > drivers/net/wan/slic_ds26522.c:209:12: error: stack frame size of 9664 bytes > in function 'slic_ds26522_probe' > drivers/crypto/ccp/ccp-ops.c:2434:5: error: stack frame size of 8832 bytes in > function 'ccp_run_cmd' > drivers/media/dvb-frontends/stv0367.c:1005:12: error: stack frame size of 7840 > bytes in function 'stv0367ter_algo' > > None of these happen with gcc today, and almost all of these are the result > of a single known bug in llvm.  Hopefully it will eventually get fixed with > the > clang-9 release. > > In the meantime, the best idea I have is to turn off asan-stack for clang-8 > and earlier, so we can produce a kernel that is safe to run. > > I have posted three patches that address the frame overflow warnings that are > not addressed by turning off asan-stack, so in combination with this change, > we get much closer to a clean allmodconfig build, which in turn is necessary > to do meaningful build regression testing. Well, I am using clang 8.0 on arm64 and running the kernel just fine for a few weeks now and never trigger a single stack overflow (THREAD_SHIFT = 15) because I never use any of those drivers you mentioned above. I don't think it is a good idea to blankly remove the testing coverage here and affect people don't use all those offensive functions at all.