From patchwork Fri Oct 16 16:02:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 7418271 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4552BBEEA4 for ; Fri, 16 Oct 2015 16:02:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7310A20905 for ; Fri, 16 Oct 2015 16:02:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92134208E1 for ; Fri, 16 Oct 2015 16:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932879AbbJPQCf (ORCPT ); Fri, 16 Oct 2015 12:02:35 -0400 Received: from mx2.parallels.com ([199.115.105.18]:58509 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932130AbbJPQCQ (ORCPT ); Fri, 16 Oct 2015 12:02:16 -0400 Received: from [199.115.105.250] (helo=mail.odin.com) by mx2.parallels.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.86) (envelope-from ) id 1Zn7SI-0006Os-EF; Fri, 16 Oct 2015 09:02:06 -0700 Received: from localhost.sw.ru (10.30.25.228) by US-EXCH.sw.swsoft.com (10.255.249.47) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 16 Oct 2015 09:02:00 -0700 From: Andrey Ryabinin To: CC: Ingo Molnar , Andi Kleen , Andrew Morton , Fengguang Wu , Mauro Carvalho Chehab , Kozlov Sergey , , , Abylay Ospan , Andrey Ryabinin Subject: [PATCH] Disable -Wframe-larger-than warnings with KASAN=y Date: Fri, 16 Oct 2015 19:02:10 +0300 Message-ID: <1445011330-22698-1-git-send-email-aryabinin@virtuozzo.com> X-Mailer: git-send-email 2.4.9 In-Reply-To: <20151005110923.GA16831@wfg-t540p.sh.intel.com> References: <20151005110923.GA16831@wfg-t540p.sh.intel.com> MIME-Version: 1.0 X-ClientProxiedBy: US-EXCH.sw.swsoft.com (10.255.249.47) To US-EXCH.sw.swsoft.com (10.255.249.47) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the kernel compiled with KASAN=y, GCC adds redzones for each variable on stack. This enlarges function's stack frame and causes: 'warning: the frame size of X bytes is larger than Y bytes' The worst case I've seen for now is following: ../net/wireless/nl80211.c: In function ‘nl80211_send_wiphy’: ../net/wireless/nl80211.c:1731:1: warning: the frame size of 5448 bytes is larger than 2048 bytes [-Wframe-larger-than=] } ^ That kind of warning becomes useless with KASAN=y. It doesn't necessarily indicate that there is some problem in the code, thus we should turn it off. Reported-by: Fengguang Wu Signed-off-by: Andrey Ryabinin Acked-by: Abylay Ospan --- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ab76b99..1d1521c 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -197,6 +197,7 @@ config ENABLE_MUST_CHECK config FRAME_WARN int "Warn for stack frames larger than (needs gcc 4.4)" range 0 8192 + default 0 if KASAN default 1024 if !64BIT default 2048 if 64BIT help