From patchwork Mon Jul 10 14:44:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 107300 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3516723qge; Mon, 10 Jul 2017 07:46:00 -0700 (PDT) X-Received: by 10.98.133.16 with SMTP id u16mr45850339pfd.140.1499697960628; Mon, 10 Jul 2017 07:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499697960; cv=none; d=google.com; s=arc-20160816; b=OloGSKXWELCkcEqB2N6UPoiBkYD680cS2X/C6CkIWGEIXU5y+ylSAHwtDJzEuuET+o zo9PCMWdSSSqxUpIbXXP2jVxEuP+EfF683Tz/LxWHyoFec2v9MEWkCT5VM4H6OwxQcWI u1eUOUQjzy1om1GSRFH0s6FzUBhc/OXVtNOEVef7xyRjUamUDcv4shRD4jLzl+tfNLKe 1uqtcY+RvNh4Qs9lugAsRHxwaXBZTD7BmVUDg1GZb43QALEv/c2vPi1hCO3Ki69dsHff qCDCw4SYDdYzN8k5Te5dK/bXl8ZArBnoKsNfXts/CAiHPRhK5sUkZJ5Ei2My/Z9vrOKf xBfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=5ONPLKRax57dfg72Nkcb65DB3DUKv/tDMc2nyG5C1fw=; b=oopphN46TA6NWKpjMdgwHOFsZH5OWxwEYZDEARjQvxVNzRNMMK7vrXQp8RA73zr5EW +ktgFLWVkF41Dzf3kj2ZRiOicsdfSJbp/+HE3quKFzNvxSpfhv/+s0NziXld1Y1LMag7 L9nrPIYNs5Uos2zcH7YJgdQcBPt8MOEb08a9eh3l6yhtNwecgBmnWNOcMnbeo07yHLSb 7DkFlQSphFW3aV/VBbe+fcIsivO9Bbg/QzGwYq+imqr3yGl1uXLaKOGp+u24D7uKdn9O S5TLxgIeryd+kvdDJAo7BrW4Nf02bVLCRSrV2HyzNRt5EFDFS5vPaHpr2Abfu4GUhbdv lskg== 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 z73si8021320pfi.49.2017.07.10.07.46.00; Mon, 10 Jul 2017 07:46:00 -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 S1754066AbdGJOpm (ORCPT + 25 others); Mon, 10 Jul 2017 10:45:42 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:56187 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753394AbdGJOpl (ORCPT ); Mon, 10 Jul 2017 10:45:41 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MfE8E-1dJ5Rr2nm6-00OmEK; Mon, 10 Jul 2017 16:44:33 +0200 From: Arnd Bergmann To: x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Kalle Valo , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, Arnd Bergmann Subject: [RFC 2/2] wl3501_cs: reduce stack size for KASAN Date: Mon, 10 Jul 2017 16:44:25 +0200 Message-Id: <20170710144425.2238584-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170710144425.2238584-1-arnd@arndb.de> References: <20170710144425.2238584-1-arnd@arndb.de> X-Provags-ID: V03:K0:hQK/HbOz94xxVR2UHagG2MTeGlCYF2GHgozK4pZlGbQd3HXFYZR sDGLSGg5tpdV5cBYCqrWWh1H43ImPJ+LH7jzBnX3pADiYMnhErzTmIZnAg/JHyoBd4vX5F/ 0MMtXO3j428zXc+aLZgPjTXj7AsPjV5Gtps9uHbRfJdtA/9lSeZLESdWjubT4EeT5eeGf6h cg2o3VEJiaNKjRWqYBrDw== X-UI-Out-Filterresults: notjunk:1; V01:K0:bTltFPUyps0=:I8zf4c4NslDBBIWC9s/GNQ 7PLKMjlaVAilBYpaTPnECER175fsEPfQ6aq+iqV5x0tdTHt4xWRStqJpZRZNngrmo45/Nd29F m/LcwtKbXoP03I2l5S514J4QzxWBm8Hsga0sqhJv0o38M/akxJ3vHwuLBjdDvRWy9uVwz91P0 UgEVb8mm8x5FKEshBF/9lb7Pd+r1qkb25RxIPWdRH1Tt+B2val7xujWBkF4Appc2VCTUOwKJp snZP979WBRVqUnqaytyJ6ZL+bMSx/zV1hSdzBvg0LrwK7oSw0mnc+cgcGHydIIH3nXF43Uk8w NMBGX2Uu+0UET/0hnmtz8nRmQL0n6b6i5zLGdNEf3Aj34zFg8T/6Ty9qqcPixCR+rlr6lp4iM POMWgurNBTJhL9uPgu7DKyk+dTVUHhXo/DSvD1gTVQOh1JRhpJpoqu9bYXzytxll/w4zLvDVh yipiapazqdnuRU5UIPKUzh+dttAjvCu64YaEQ8E8CGK99mtyxi9TmeMws5oBRx2VEaXXn2Rl3 BYIk3rSFCu2rlYSTdExDEjXu3yCBi2V3veReFHcntOTGGqCHBJPDzoYIMpDTHSnzDi1CnFCQT 9yKEr+/PsxRhr/1ry1PsTiDviP5AP9kw9vPTjC3hO+ueVseknjqcpB3VDlKax/7dC26nwqXdM BnyfsNiVGkGGwhegVl3mX85tL7vZrgLSB+BqZpJ+5QM0oPkQEiJ3Ec2YvDubTWdrEu8M= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Inlining functions with local variables can lead to excessive stack usage with KASAN after a previous patch that modifies the outsb/insb helpers on x86. 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 the two callers of insb/outb 'noinline' prevents the compiler from adding up the stack usage for each of the local variables passed into those, reducing the maximum stack frame size to 800 bytes with KASAN again. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/wl3501_cs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.9.0 diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index acec0d9ec422..2cce22571b4c 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 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 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 :