Message ID | 20190703205527.955320-3-arnd@arndb.de |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1373509ilk; Wed, 3 Jul 2019 13:56:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhjyakomER2FiO53UGS4XP3qQ0mg+SwtijjsQccsnX6nZuFxStuukggoTjpqjW1BRN6MKL X-Received: by 2002:a63:211c:: with SMTP id h28mr26273570pgh.438.1562187415886; Wed, 03 Jul 2019 13:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562187415; cv=none; d=google.com; s=arc-20160816; b=xSfQISA1a20Y0sy0CiftIQiS6wc04nt9wfywpKRJmU/9XdwqLx65ZcTb/T3DopNtRP Wvn4YWR2dRJ8tCBO07dtfrjcl5mtlKYc4ymCYbI9A3cMqORHVkSmD6I3utHjPXDJJpFj /tKHB8YioY/b6wBlILG7eNEa75z6dKCvWPGEJTT9CRVxT7gN5tpqqQzA4FARRKV31g4q 5ZipCAzVs1Ae6cpzvWBP8cvrInlAaegf7159hF4cLEtvcxjrGPeHPLX8+Som2FBLAOXg 3/IG2yT20xoLV5c7HvYjaBJdBUjg++SUbNw/phCU4L1iUpgks9tHfziZjTDcBXIBndlh s/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:message-id:date:subject:cc:to:from; bh=JedBINZKkb5BYE6srGTfrrpmyMp18YxFHWY1mJ8AZxM=; b=h8aBpLZixV/Rl42+k+yNtnHr3QozG8LIwlnH+rL2hWfclfjs8mWazNqYVj4YcxJsdC ooTSKj7H5Rm+NZ8DBaBVjycolYJoWQxxV3YjK+Sh0kwKuESoRis4GroYeR5hGcY+CN5D Ns3WQy+BvWD9jeDUa5a0t3aQYXJXDFAUz2hcjumCRt8skzjLHlrb+clzpH0nr3AeldbP DHUH+2nqO1Kt2JY4aooZqFbPnmMR5IA7mMnr70XWJauwLmgHPjy1cHxKY1hbgNY4Yf3I bG9EgLSKCP6N5aCUGqpRpiA5loRk3+dfMmIJnP0FDxf5asslhtK0vlGVbuGJickcbTVh ODpQ== 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24si2797871pjt.88.2019.07.03.13.56.55; Wed, 03 Jul 2019 13:56:55 -0700 (PDT) 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 S1727350AbfGCU4y (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Wed, 3 Jul 2019 16:56:54 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:40747 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfGCU4y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 3 Jul 2019 16:56:54 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MCbZL-1hrszW1Wi3-009fcz; Wed, 03 Jul 2019 22:56:37 +0200 From: Arnd Bergmann <arnd@arndb.de> To: Florian Fainelli <f.fainelli@gmail.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>, Abbott Liu <liuwenliang@huawei.com>, linux-arm-kernel@lists.infradead.org, kasan-dev@googlegroups.com, Linus Walleij <linus.walleij@linaro.org>, Arnd Bergmann <arnd@arndb.de>, Andrew Morton <akpm@linux-foundation.org>, Masahiro Yamada <yamada.masahiro@socionext.com>, Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] kasan: increase 32-bit stack frame warning limit Date: Wed, 3 Jul 2019 22:54:38 +0200 Message-Id: <20190703205527.955320-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190703205527.955320-1-arnd@arndb.de> References: <20190703205527.955320-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:8pSJiH+6Agod8nzM29uheH50kgOrBaKHZzl6ndhrvPiQDTdiHui W5pteQ/meterbUyb16uPXBdh/bTTq2+X7Dk5d7PAcip6R5BCBPu9tNJQGkCbISINyzxc4E3 ufLi+uJnI/JUTqJcROzbiTnzXM5lLSFjTSMLV+q7duZFqGKVqJd+NvheDVswutkffm0UA2T TfDWqX7IhnITKKyiWsxrA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:3Ix8Jf1u9lw=:pjqfTjTFLOmjIDonH9fhGO mHR6MCXiiA+Fcqph4cAytscXm6iAv/rKcr/9/TiHbHVVsjckLsemrX4ckG9DSoruNNgcyJZU6 iOh8oppdJ0CmQLWMXd9XwgOkCOhnP9vSEcCbJv0xxPSh5jCSx9DuUzhZyzfxwQUQSPTD8ZZ2i t8FXl40rX/HMeA4I13WzDKH/5A2FNnIENm7M9rUTO700Bd7uTcBKAa7mlM+VdnwpaYWJ2RRtA WfqrTrQsGfObU4oOpKitmyB50dNiiNQMY56Dn6Dsh76mVyRlLUnc6QHQ4N0elrylTNwYj/ihI 61Ox5FaGZmJDnXmnGoFY2sD2hny0rzusVuk5DpRThYWLJ5aatwd+B3ce7oeeO9NJRExGDIni4 BHuWsm+m/eCraU0WPVTSM87vm1asD/ayohcM1+LdMTcoMzb9LlWx0ALq9MJu/CKgV9De8/3b9 d3/VN94DYA9jeePRDe7XPFDTNj2Tn+7KpCruJu15FS9qth6rpir7mcXY3UcNbIiiAW0gMe7w+ /OOpsa7lPMhg8f39gUMxhnjD6EufdR5k/B56MNvwwXPkkoRSgsJHf6gc9m7CmmxVLAsNOqOJm hN2h21mCFCGBXsyB5O/KCiZHxoEKeC65vGSjC034oyin5/vtkSzw+IjuYpdEELk2rIyJOnRgX zFxLbriBO8AJIvgkUiCOqFp7zMO5cjWvACRnImwP8b5VHSmDtbyQA6vmdcyt/fVyBlbr/1b48 GyzK0D05aGULm/4LZ3MsFTAW2SkdaJZmX220Qg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6d2799190fba..41b0ae9d05d9 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -251,7 +251,7 @@ config FRAME_WARN int "Warn for stack frames larger than (needs gcc 4.4)" range 0 8192 default 2048 if GCC_PLUGIN_LATENT_ENTROPY - default 1280 if (!64BIT && PARISC) + default 1280 if (!64BIT && (PARISC || KASAN)) default 1024 if (!64BIT && !PARISC) default 2048 if 64BIT help
Enabling kasan on 32-bit ARM introduces some new warnings in the allmodconfig build due to mildly increased kernel stack usage, even when asan-stack is disabled: fs/select.c:621:5: error: stack frame size of 1032 bytes in function 'core_sys_select' net/mac80211/mlme.c:4047:6: error: stack frame size of 1032 bytes in function 'ieee80211_sta_rx_queued_mgmt' drivers/infiniband/sw/rxe/rxe_req.c:583:5: error: stack frame size of 1152 bytes in function 'rxe_requester' fs/ubifs/replay.c:1193:5: error: stack frame size of 1152 bytes in function 'ubifs_replay_journal' drivers/mtd/chips/cfi_cmdset_0001.c:1868:12: error: stack frame size of 1104 bytes in function 'cfi_intelext_writev' drivers/ntb/hw/idt/ntb_hw_idt.c:1041:27: error: stack frame size of 1032 bytes in function 'idt_scan_mws' drivers/mtd/nftlcore.c:674:12: error: stack frame size of 1120 bytes in function 'nftl_writeblock' drivers/net/wireless/cisco/airo.c:3793:12: error: stack frame size of 1040 bytes in function 'setup_card' drivers/staging/fbtft/fbtft-core.c:989:5: error: stack frame size of 1232 bytes in function 'fbtft_init_display' drivers/staging/fbtft/fbtft-core.c:907:12: error: stack frame size of 1072 bytes in function 'fbtft_init_display_dt' drivers/staging/wlan-ng/cfg80211.c:272:12: error: stack frame size of 1040 bytes in function 'prism2_scan' Some of these are intentionally high, others are from sloppy coding practice and should perhaps be reduced a lot. For 64-bit, the limit is currently much higher at 2048 bytes, which does not cause many warnings and could even be reduced. Changing the limit to 1280 bytes with KASAN also takes care of all cases I see. If we go beyond that with KASAN, or over the normal 1024 byte limit without it, that is however something we should definitely address in the code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0