From patchwork Thu Mar 2 16:38:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9601109 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4149960453 for ; Thu, 2 Mar 2017 17:15:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E1AF26BE9 for ; Thu, 2 Mar 2017 17:15:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22C3128479; Thu, 2 Mar 2017 17:15:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9CF926BE9 for ; Thu, 2 Mar 2017 17:15:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754834AbdCBRNK (ORCPT ); Thu, 2 Mar 2017 12:13:10 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:62338 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753100AbdCBRLM (ORCPT ); Thu, 2 Mar 2017 12:11:12 -0500 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0M62Cw-1cLuBb08FO-00yAX1; Thu, 02 Mar 2017 17:38:53 +0100 From: Arnd Bergmann To: kasan-dev@googlegroups.com Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-wireless@vger.kernel.org, kernel-build-reports@lists.linaro.org, "David S . Miller" , Arnd Bergmann Subject: [PATCH 12/26] wl3501_cs: reduce stack size for KASAN Date: Thu, 2 Mar 2017 17:38:20 +0100 Message-Id: <20170302163834.2273519-13-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170302163834.2273519-1-arnd@arndb.de> References: <20170302163834.2273519-1-arnd@arndb.de> X-Provags-ID: V03:K0:OrP0xqubNX9dTkSQGw2rCTNQLoACZcfNbeK4PlO4kVJeDAg7wzQ NR6JMQJLJAlCFfuCVpxBJUFnEUDwwMZSLPSL4wQbZNZACQPNpQBkubdzOGnL4mxOPVukimE 11WkiDyR2emKSqrS64JzZ7Ro1sLlKo+qeZHujJI8X4U98SJx4vlbYqh3bOm6zqVs3UkjoOX ZkmtbOK63HZRY6g59dvIQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:H3F0jArNYyk=:MgK38fJxpt77rXrrhFM3Qy WbyqL25i8JQNEj+qvwTA+Xns+r3+8Qb47MdbzjzSRmHTZgm/58ncxoqUAV3w9qI98Cr1al4Z2 FpnpK/mkJdqQvFf8wFkYuRktwSysQl4ywDkspZrYTd4RnYFAPnVYDDFf8W+fbss1ieRv+Z/W5 EjeukymoL8oKEkWUWjHH5PY6ztixWYN38MjPi3Q/arRNr2YR3kU7C/njEOaD4SHenpINILzsY Gzi6gENkN+RlyowACKgn9imdSj/d2eOX7moF6ZjnuW8p5BmRXniVUzeMfHak/oJPq6MfjKZiv oTVkk4zspsli/w48saQtNjL8id5z91LlP99POryuhOUSga7EiZDXmRwpQdUTC9Pkcz+ALmYK0 4Mql1xQWqfP9HgK2dbhwTmF9LziVl32L5kHxO2loYXLUw88z+iAYqYES+M1IcTWhbykeKfXpg Cx6hECtyNeNCsO9jfsnz5IkZ3bubr/ZMDB0FQnsiIeUfMgN0Vn9NfEr6ArDZ1S6kglJYHwCqt 7Np1jrjKDExUVFcxQbKSDiQeGY/7Co1q3nlBo12bYXlVtaBgNroyaZcdpFt4uLI/XDSFmA/ND ThbocidNnnzjPRQSOTLi1xbVFDP2ll/3SuUvpfnCeutslvwWH+kA+7JhW3e2QrVQIuBrPdA33 OBrtFVx44GRohshPr2JaXfODMyaOdtrZP+6z3n/W3EzKeVCrzudhH1UGVXop9vScBAXc= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Inlining functions with local variables can lead to excessive stack usage with KASAN: drivers/net/wireless/wl3501_cs.c: In function 'wl3501_rx_interrupt': drivers/net/wireless/wl3501_cs.c:1103:1: error: the frame size of 2232 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] Marking a few functions as noinline_for_kasan avoids the problem Signed-off-by: Arnd Bergmann --- drivers/net/wireless/wl3501_cs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index acec0d9ec422..15dd8e31d373 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c @@ -242,8 +242,8 @@ static int wl3501_get_flash_mac_addr(struct wl3501_card *this) * * Move 'size' bytes from PC to card. (Shouldn't be interrupted) */ -static void wl3501_set_to_wla(struct wl3501_card *this, u16 dest, void *src, - int size) +static noinline_for_kasan void wl3501_set_to_wla(struct wl3501_card *this, + u16 dest, void *src, int size) { /* switch to SRAM Page 0 */ wl3501_switch_page(this, (dest & 0x8000) ? WL3501_BSS_SPAGE1 : @@ -264,8 +264,8 @@ static void wl3501_set_to_wla(struct wl3501_card *this, u16 dest, void *src, * * Move 'size' bytes from card to PC. (Shouldn't be interrupted) */ -static void wl3501_get_from_wla(struct wl3501_card *this, u16 src, void *dest, - int size) +static noinline_for_kasan void wl3501_get_from_wla(struct wl3501_card *this, + u16 src, void *dest, int size) { /* switch to SRAM Page 0 */ wl3501_switch_page(this, (src & 0x8000) ? WL3501_BSS_SPAGE1 : @@ -1037,7 +1037,7 @@ static inline void wl3501_auth_confirm_interrupt(struct wl3501_card *this, wl3501_mgmt_resync(this); } -static inline void wl3501_rx_interrupt(struct net_device *dev) +static noinline_for_kasan void wl3501_rx_interrupt(struct net_device *dev) { int morepkts; u16 addr;