From patchwork Thu Mar 2 16:38:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9601125 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 4470D60453 for ; Thu, 2 Mar 2017 17:16:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3101B26BE9 for ; Thu, 2 Mar 2017 17:16:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25CA0283EE; Thu, 2 Mar 2017 17:16:10 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 CF75226BE9 for ; Thu, 2 Mar 2017 17:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754793AbdCBRNF (ORCPT ); Thu, 2 Mar 2017 12:13:05 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:49837 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752570AbdCBRLM (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 0MEwBu-1cUfdw2EGo-00G04l; Thu, 02 Mar 2017 17:38:50 +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 07/26] brcmsmac: reduce stack size with KASAN Date: Thu, 2 Mar 2017 17:38:15 +0100 Message-Id: <20170302163834.2273519-8-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:jDhsGlHhKLCPXlDKDys/y/HDUOZ952xZw4gt6ENXZFQGVGF6fNY VmGr63COM7KYJDGeoxNz5pt+Nrd6rDjW5/By2BZQ4v+OwDEjjMY6s6FwArDCBY1UqGsFKuL ULdfu/7yIff0gRn9TBtDl6iMGcqQLcGaRBhnUN8UlIoS9MNRGz3YH4KXrfjMB3xOdUVFpi3 flHFne3c0cDgnh1nq5CzA== X-UI-Out-Filterresults: notjunk:1; V01:K0:72VDFEcsThY=:K1dAIDUIn/KPGYE6vx2WHY 4sFZa7urnm/99ubsno4bt8GHtyuHLYCzm7VpcqanJ9isH2pdjaRHyOZmALxMQVHXOkgOd/ip1 iVTtziddGpjwSxeqTqr+qnZqkgSroPqhtnOJuhs5YOa2mysTrNf/g7OGI1aUe/LSXlW8T3fOg M3yQY2xaDR49fdK7rcIWLB4PJz6SPrIYROMlzKE0wwVCmRLK0ZLpqGxANKVzYF2FTV8m2JWkq 9VPXCodofOqow8mihjB7tjxP789VPsB8pQkxpLXxLoXXXLP5uSJgjVqEt57BYKAQQeZ+SCWgZ ZnKHQ4BuBTqCL+Oo82TVISVTKF8jPW8nJk+Rf8AACL70ho93/PV1/BETQxJLCiF5k4rqMvB+z Q/at/kWLIe4afLWiP+igZcBIBAdNsfGgGk0MxX/R+WbaQXB28E2GAHolg6mPmD27+1+Q07v6i iWrc+er+X4ni3DV3KwEmCGfyrUa3G7qgfbZCgwFh4Vw/dNWHX3Ff7z6mTAwZib8gjRvu7IDQL QCbn5/PbUIw/QrgvDS7B9bVoBE5RjLnnFlZEHtjiT8+xa50yYzikv978g7MwA+8wdItjnUmJu uSxEeJ3UQsOuaw3ayu4hGexIXHalLiK7WS5Z0JElB9XaIDOMqqECQG+6gg4KDDdBygWm4eEg+ joVMeFKcSn4fYNNMmBDRaH39n1VvRY1M+os0rz/lM1yni0NuN05oRpALWx/nbIJmsImU= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The wlc_phy_table_write_nphy/wlc_phy_table_read_nphy functions always put an object on the stack, which will each require a redzone with KASAN and lead to possible stack overflow: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy': drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: warning: the frame size of 6312 bytes is larger than 1000 bytes [-Wframe-larger-than=] This marks the two functions as noinline_for_kasan, avoiding the problem entirely. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c index b3aab2fe96eb..42dc8e1f483d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c @@ -14157,7 +14157,7 @@ static void wlc_phy_bphy_init_nphy(struct brcms_phy *pi) write_phy_reg(pi, NPHY_TO_BPHY_OFF + BPHY_STEP, 0x668); } -void +noinline_for_kasan void wlc_phy_table_write_nphy(struct brcms_phy *pi, u32 id, u32 len, u32 offset, u32 width, const void *data) { @@ -14171,7 +14171,7 @@ wlc_phy_table_write_nphy(struct brcms_phy *pi, u32 id, u32 len, u32 offset, wlc_phy_write_table_nphy(pi, &tbl); } -void +noinline_for_kasan void wlc_phy_table_read_nphy(struct brcms_phy *pi, u32 id, u32 len, u32 offset, u32 width, void *data) {